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 & marqueesRuler Card Carousel
Glitch Wipe RevealBrowse all 1823D Image Sphere
  • 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

Ruler Card Carousel

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

Setup

npm i gsapregisterPlugin(CustomEase, Draggable)

More like this

  • Card
  • Carousel
  • Infinite loop
  • Draggable

Features.

  • An endless row of tall 4:5 cards centred on the active one, running off both sides of the section
  • A ruler under the row: one long tick per card, short ticks between, and an orange pin with a diamond head that rides along it as the row moves
  • The pin lands on the active card's long tick, and sweeps back along the whole ruler when the row wraps from the last card to the first
  • Drag it and it follows the pointer; let go and it lands on the nearest card, or the next one if you flicked
  • Click a side card to bring it to the centre; the centred card's link works as normal
  • A sideways trackpad swipe steps one card; vertical scrolling stays with the page
  • Square arrows and ← / → step one card in 0.8s on the house curve, with → as next, and quick presses stack
  • Greyscale until hover or keyboard focus, when the colour comes back, the photo eases out and a corner arrow slides in; on touch the centred card shows its colour
  • Tab reaches the cards on screen and centres the one it lands on; cards off screen can't be reached
  • Copies of the set fill any screen width, from a phone to an ultra-wide
  • Step time, ruler ticks, greyscale and trackpad swipes are options
  • Respects prefers-reduced-motion: steps land at once and the hover fades are dropped
  • GSAP with CustomEase and Draggable

How to get it right.

Use portrait photos

Cards are 4:5 and crop to fill. A card is 30% of the row on desktop and 78% on phones, so export around 800px wide.

Five to eight cards

The ruler has one long tick per card, so it reads best with five to eight. Two is the minimum. With few cards on a wide screen the script repeats the set; the copies are hidden from screen readers and skipped by Tab.

Give every card a real link

Each card is a link. A drag or a click on a side card never follows it; a click on the centred card does. If the cards shouldn't link anywhere, swap the <a class="rcl_link"> for a <div class="rcl_link">.

Short screens

Cards never grow taller than 60% of the screen height (--rcl-card-max), so a landscape phone still sees the ruler under them.

Variations.

  • Default — step time 0.8s, four short ticks between cards, greyscale until hover, trackpad swipes on
  • Fine ruler — data-au-ticks="9": a tick every tenth of a card
  • Plain ruler — data-au-ticks="0": long ticks only
  • Full colour — data-au-mono="false"
  • Snappy — data-au-duration="0.4"
  • Wider cards — set --rcl-card: 40% on .rcl_section
  • Your colours — override the --rcl-* variables

Where it fits.

  • Category or service indexes — one card per area, each linking to its page
  • Portfolio sections — projects in a row, the ruler showing where you are
  • Product ranges — a collection you step through one piece at a time
  • Case studies and features — chapters or spaces in a building, a garden, a journey

Frequently asked.

The right arrow, → and dragging to the left all bring the card on the right to the centre.

The ruler goes from the first card to the last. When the row wraps round, the pin sweeps back to the start in step with the row instead of jumping.

Yes: data-au-mono="false". The corner arrow and the photo easing out still show on hover.

Yes. Swipe sideways to drag it; vertical swipes and pinch stay with the page. A tap on a side card centres it, and the centred card shows its colour.

Yes. Each runs on its own. Give each heading its own id and point that section's aria-labelledby at it.

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

Related components.

NewPro

Ink Bloom Slider

Click

Pro

Rotating Ring Timeline

Drag

Pro

Bulging Strip Slider

Drag