Skip to content
Components67 / 118

Pill Carousel

A card carousel whose page dots grow into name pills. Every dot follows the carousel's live position, so the old pill melts back into a dot while the next swells into a pill and its name sharpens out of a blur, even mid-drag. One spring runs it all: cards overshoot, squash and stretch with their speed and smear with a motion blur; dots swell as your cursor nears.

CarouselPaginationDragSpringsSquash & stretchGSAP
Drag or flick the cardsClick a dot or a side card

Tweak

LIVE

Cards

300px
0.80
7

Look

Page

Props

8 props
  • items{ src: string; name: string; focus?: string; alt?: string }[]
    The cards (keep the array stable).
  • indexnumber
    Starting card.default 0
  • onChange(index: number) => void
    Called when the card changes.
  • cardWidthnumber
    Card width, px.default 300
  • aspectnumber
    Card width / height.default 0.8
  • gapnumber
    Space between cards and pager, px.default 22
  • tone"light" | "dark"
    Pager colours for the page.default "light"
  • classNamestring
    Extra classes.