Carousel

No dependencies

Free to use in any project, commercial included. MIT-0, no attribution required. Licence

Install with shadcn

npx shadcn@latest add @movin/card-carousel
Source on GitHub

About this component

A card with a swipeable gallery that snaps to each slide; the dots below stretch and shrink with the scroll position itself, so they move mid-swipe rather than only when a slide lands.

Dependencies
None
Difficulty
Beginner
Triggers
state change, morph, card
Techniques
event position, svg
Reduced motion
Respected
Theme
Light and dark (follows your page's color-scheme)

Marked up as a carousel: each slide is a group with an aria-label such as "2 of 4: Harbour", the scroller is focusable and the arrows are labelled buttons. Under prefers-reduced-motion the arrows jump instead of scrolling smoothly.

More cards

See all

Stoneware mug

$24
Cart

Launch prep

Checklist

10:08London · GMT

Clock
sign.ts
1export function sign(id) {
2 const t = make(id);
3 log(t);
3 return t;
4}
Diff