Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultScrollDrifting Box Rows
Expanding Bento GridBrowse all 182Full-Bleed Image Expand
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

Drifting Box Rows

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap
  • ScrollTrigger

Setup

npm i gsapregisterPlugin(ScrollTrigger)

More like this

  • Grid
  • ScrollTrigger

Features.

  • Full-height split rows: a coloured text panel beside a dark panel with a box in the same colour
  • The box drifts between three stops as the row scrolls past, scrubbed with a little catch-up (scrub 0.5)
  • Four hairlines ride the box's edges, so it always reads as the middle cell of a moving 3 × 3 grid
  • On desktop with a mouse, box and lines lean up to 25px towards the pointer and ease back when it leaves
  • Each text panel rises in once when its top is three-quarters of the way down the screen
  • Rows can swap sides and run the path backwards, so a stack never repeats itself
  • Stacks text over panel below 992px, with a four-stop path that loops back to the start
  • Respects prefers-reduced-motion: the box rests on its first stop, no lean, no reveal

How to get it right.

Mix the rows up

Alternate bxs_row--reversed so the text panel switches sides, and add data-bxs-path="reverse" to the odd row out. Three rows with three different colour pairs read best.

Keep headings short

Titles are 4.75em on desktop and sit top left. Two short lines with a <br /> fill the panel.

Body copy is optional

Rows ship with a heading only. To add a paragraph, put <p class="bxs_body"> after the title (body in React). It pins bottom right, so keep it short.

Give the box contrast

The box takes the row's colour and sits on the dark --bxs-surface. Keep row colours clearly lighter or brighter than that surface, or the box disappears.

Leave room to scroll

Each row is a full 100lvh tall and the path runs from the row's top at 75% of the screen to its bottom at 25%. Put the rows in normal flow, not inside a fixed-height wrapper.

Variations.

  • Locked to scroll — data-au-scrub="0" for a box that tracks the scroll exactly
  • Still — data-au-lean="0" to switch the pointer lean off
  • Strong lean — data-au-lean="50" for a box that follows the pointer further
  • One colour — give every row the same pair, e.g. all bxs_row--brand

Where it fits.

  • About pages — one value or chapter per row
  • Brand guidelines — one colour per row, as in the demo
  • Services — a discipline per row, its own colour each
  • Long-form editorial — section breaks between chapters

Frequently asked.

Copy a whole [data-bxs-row] section, with its text panel, panel, box and four lines. The script runs every row it finds inside the root.

Yes. Override the pairs on the root (--bxs-brand / --bxs-brand-ink, --bxs-stone / --bxs-stone-ink, --bxs-light / --bxs-light-ink), or set --bxs-fill and --bxs-ink on a single row.

The lean only runs at 992px and wider on devices that can hover. Touch screens get the scroll path alone.

Not as it ships: the box is a solid layer clipped with clip-path. Give .bxs_box a background-image and it's clipped the same way.

No. It scrubs off the scroll position, so it works with native scrolling and with any smooth-scroll library that updates ScrollTrigger.

Related components.

NewPro

Arc Collage Hero

Scroll

Pro

Rising Card on Scroll

Scroll

Pro

Outline Paint Reveal

Scroll