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
VaultSliders & marqueesScaling Row Slider
Draggable Brick GridBrowse all 182Frame to Frame Image
  • 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

Scaling Row Slider

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
  • CustomEase
  • Draggable
  • InertiaPlugin

Setup

npm i gsapregisterPlugin(CustomEase, Draggable, InertiaPlugin)

More like this

  • Carousel
  • Velocity
  • Infinite loop
  • Draggable

Features.

  • A full-height row of square photos standing on one baseline, each sized by where it sits across the width
  • The row shrinks steadily towards the left on a power curve and the biggest card sits at the right edge, sliding off it as the row moves
  • Three to six cards on screen, picked from the stage's shape (wider stages show more)
  • Drifts left on its own, speeds up while the page scrolls (either direction) and glides back to its drift when the scroll stops
  • Drag it or throw it; the row follows the finger
  • The drift pauses under the mouse, on keyboard focus and off screen; a tap pauses it on touch
  • Pill arrows and ← / → step exactly one card in 0.8s, with → as next, and quick presses stack
  • Arrows have a 44px tap area
  • Endless: the wrap from one end of the row to the other always happens off the left edge, and under six cards the row repeats them
  • Moved by transform only, from fixed-size frames, with a 1.5px overlap so no seams show
  • Smallest card, drift, scroll boost and drag speed are options
  • Respects prefers-reduced-motion: no drift, scroll boost or throw, and steps and drags land at once on a whole card
  • GSAP with CustomEase, Draggable and InertiaPlugin

How to get it right.

Use square photos

Every card is a square. Other shapes are cropped to fill it, centred across and 22% from the top (--fos-focus-y). The head card is 40% of the stage width or more, so export around 1000px.

Eight to twelve cards

Up to six cards are on screen at once. With fewer than about eight the same photo comes round again quickly. Three is the minimum; under six the script repeats them to fill the row, so a photo can be on screen twice.

Give it the full height

The cards stand on the bottom edge and the head card can be over half the stage width tall, so the stage needs its full height (100vh, 100svh at 767px and below).

The heading is optional

It ships without one. To add one, put <header class="fos_head"> first in the root with a .fos_label and an .fos_title, and swap the root's aria-label for aria-labelledby pointing at the heading. Keep it to two or three lines.

Put it between sections

The scroll boost only shows while the page moves, so give the page something above and below to scroll through.

Variations.

  • Default — smallest card 0.3, drift 0.0016, scroll boost 0.0002, drag 0.0012
  • Flatter row — data-au-min-scale="0.6": the cards stay closer in size
  • Steep falloff — data-au-min-scale="0.15": a big head card and a long tail of small ones
  • Still until touched — data-au-autoplay="0": no drift, only scroll, drag and arrows move it
  • No scroll boost — data-au-scroll="0"
  • Your colours — override the --fos-* variables

Where it fits.

  • Portfolio and studio pages — a row of work that keeps moving between two sections
  • Product ranges — square packshots, the newest one biggest
  • Editorial features — a set of photos that reacts to the reader scrolling past
  • Team or project indexes — square portraits or covers

Frequently asked.

Left. Cards come in large from the right edge and shrink away to the left. "Next" (the right arrow button) and → move it that way; "Previous" and ← move it back.

Set data-au-autoplay="0" and data-au-scroll="0", and it rests on a whole card. Dragging and the arrows still work. People can pause the drift themselves with the mouse, keyboard focus or a tap.

Yes. The scroll boost reads window.scrollY every frame, so it works with native scroll or Lenis.

Yes. Swipe sideways to drag it; vertical swipes and pinch stay with the page, and a tap pauses or restarts the drift. A tall phone screen shows three cards.

Yes. Every slider runs on its own. Give each its own aria-label.

Yes: gsap, CustomEase, Draggable and InertiaPlugin, loaded before the script.

Related components.

NewPro

Ink Bloom Slider

Click

Pro

Rotating Ring Timeline

Drag

Pro

Ruler Card Carousel

Drag