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 & marqueesLens Zoom Carousel
Label Pill CursorBrowse all 182Line FAQ Accordion
  • 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

Lens Zoom Carousel

This one is free. Make an account and the code is yours, no card needed.

Create a free account

What you'll need.

Install

  • gsap
  • Draggable
  • InertiaPlugin
  • CustomEase

Setup

npm i gsapregisterPlugin(Draggable, InertiaPlugin, CustomEase)

More like this

  • Card
  • Carousel
  • Infinite loop
  • Draggable

Features.

  • An endless strip of portrait cards: drag it, throw it, it never runs out
  • A lens on the centre line: the card under it swells to 1.6×, its neighbours partly, the far ones settle at 0.75×
  • The strip opens up round the lens as cards grow, so the big ones never overlap their neighbours
  • Throws coast with inertia and always land with a card centred
  • Arrow buttons and Left / Right keys step one card, with Right as next, and quick presses stack; clicking or tabbing to an off-centre card glides it to the centre
  • Whatever interrupts it, a press, a drag or a resize, it ends with a card on the line
  • Arrows have a 44px tap area
  • A drag never follows a link; the centred card's link works as normal
  • Lens size, zoom, far scale and spread are all options
  • Cards are links, so they keep their own focus ring and href; the endless copies are hidden from screen readers and the tab order
  • Smaller cards below 768px
  • Respects prefers-reduced-motion: no throw and no glide, it lands at once; dragging still works
  • GSAP with Draggable, InertiaPlugin and CustomEase

How to get it right.

Use portrait images

Cards are 3:4 and crop to it. Pictures with the subject in the middle hold up at every scale the lens passes them through.

Five to ten cards

The strip repeats, so a handful is enough. With fewer than five, the same picture turns up on both sides of the lens at once on a wide screen.

Balance zoom and spread

Bigger zoom needs more spread or the cards next to the lens feel crowded. 1.6 with 32 is the balanced default; try 2 with 56.

The hint is optional

It ships without one. To add one, put <p class="lnr_label">Your hint</p> first in the rail, or pass hint in React.

Give it the full width

The lens is the rail's centre line and the endless copies are counted from the rail's width. It's built to run edge to edge.

Variations.

  • Default — lens 260, zoom 1.6, far 0.75, spread 32
  • Magnifier — data-au-lens="160" and data-au-max-scale="2": only the centre card grows
  • Gentle wave — data-au-lens="420", data-au-max-scale="1.3" and data-au-min-scale="0.9"
  • Tight — data-au-spread="0": neighbours only part by the width they grew
  • Your colours — override the --lnr-* variables on the rail; --lnr-card-width sets the card size

Where it fits.

  • Portfolio or lookbook — a row of covers you can flick through
  • Product ranges — colourways or editions, one in focus at a time
  • Team pages — portraits with the centred one linking to a bio
  • Blog or journal — article covers as an endless shelf

Frequently asked.

Give each card an href. Clicking the centred card follows it; clicking any other card centres it first. Cards with href="#" never navigate.

The script clones your cards before and after them so the strip never ends. The copies are aria-hidden and out of the tab order, and destroy() removes them.

The lens width and spread are in px at a 16px font size and scale with the rail's font size, while the cards drop to 8.125em. On small screens the lens covers relatively more of the strip; lower data-au-lens if you want it tighter.

Yes. Tab to the rail (or click it) and use Left / Right, or tab to the arrow buttons. Tabbing to a card brings it to the centre; Enter on an off-centre card centres it, and Enter on the centred one follows its link.

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

Related components.

NewPro

Ink Bloom Slider

Click

Pro

Rotating Ring Timeline

Drag

Pro

Ruler Card Carousel

Drag