Images hung on a slowly turning 3D ring. Drag or swipe to spin it with real momentum; cards dim and fall back as they turn away.
A carousel you can throw: it keeps the momentum of your flick, then springs to the nearest slide, with a progress bar and arrow controls.
Customize
Usage
import { DragCarousel } from "@/components/motionkit/drag-carousel";
<DragCarousel
label="Destinations"
slides={[
{ title: "Northern lights", caption: "Tromsø, Norway", image: "/photos/tromso.jpg", alt: "Green aurora over a fjord" },
{ title: "Salt flats", caption: "Uyuni, Bolivia", image: "/photos/uyuni.jpg", alt: "Sky reflected in flooded salt flats" },
]}
/>Motion
The exact curves this component runs, plotted with Motion's own maths.
Snaps to a slide
Release a drag, or the arrows
Photo and product galleries, case studies, testimonials, travel and portfolio sites, and app onboarding screens.
The track is a Motion element dragged on the x axis within constraints worked out from the slide width, gap and viewport, so the last slide stops at the edge. On release, the drag's velocity projects where a flick would carry it, and the track springs to the nearest slide to that point. The progress bar reads the same motion value, so it moves with your finger, and the arrow keys and buttons step one slide at a time.
| Prop | Type | Default | Description |
|---|---|---|---|
| slides | { title; caption?; image?; alt?; color? }[] | six samples | The slides. Without an image, color is used as the background. |
| children | ReactNode[] | — | Your own slides instead; each child is one slide. |
| slideWidth | number | 260 | Slide width in pixels. |
| gap | number | 16 | Space between slides in pixels. |
| accent | string | "#5FAEB4" | Colour of the progress bar. |
| label | string | "Gallery" | Names the carousel for screen readers. |
How we audit: the WCAG 2.2 animation checklist and respecting reduced motion in React.
Yes. The file starts with "use client", so you can import it straight into a Server Component page or layout. It works in Vite as is, and in Astro as a React island.
Only the motion package, beside React and Tailwind CSS v4. There is no MotionKit package and no Tailwind config to add.
Yes, with MotionKit Plus. Add the @motionkit registry and your personal token to components.json (the snippet is on your account page), then run npx shadcn@latest add @motionkit/drag-carousel. It saves the file to components/motionkit and installs its dependencies.
Drag Carousel is part of MotionKit Plus (£12 / $15 / €14 a month or £96 / $120 / €112 a year). The live preview and playground are free to explore; Plus unlocks its source code, every customisation control and commercial use.
With reduced motion on, slides jump into place without momentum or springs.
Images hung on a slowly turning 3D ring. Drag or swipe to spin it with real momentum; cards dim and fall back as they turn away.
Overlapping images that drift at different speeds and tidy into a stack as you scroll, for editorial storytelling.
A deck you swipe through: fling the top card and it tucks in at the back.
Northern lights
Tromsø, Norway
Salt flats
Uyuni, Bolivia
Desert dunes
Sossusvlei, Namibia
Glacier lagoon
Jökulsárlón, Iceland
Rice terraces
Bali, Indonesia
Fjord at dusk
Geiranger, Norway
Slide 1 of 6. Use the arrow keys or the buttons to move.
The live preview is free to explore. Plus unlocks the source for Drag Carousel and every other premium component.
Not ready for Plus? A free account unlocks 4 premium components, Depth Card, Rolling Text, Dot Wave and Confetti Button, with no card needed.
Customize
Usage
import { DragCarousel } from "@/components/motionkit/drag-carousel";
<DragCarousel
label="Destinations"
slides={[
{ title: "Northern lights", caption: "Tromsø, Norway", image: "/photos/tromso.jpg", alt: "Green aurora over a fjord" },
{ title: "Salt flats", caption: "Uyuni, Bolivia", image: "/photos/uyuni.jpg", alt: "Sky reflected in flooded salt flats" },
]}
/>Motion
The exact curves this component runs, plotted with Motion's own maths.
Snaps to a slide
Release a drag, or the arrows
Northern lights
Tromsø, Norway
Salt flats
Uyuni, Bolivia
Desert dunes
Sossusvlei, Namibia
Glacier lagoon
Jökulsárlón, Iceland
Rice terraces
Bali, Indonesia
Fjord at dusk
Geiranger, Norway
Slide 1 of 6. Use the arrow keys or the buttons to move.