Carousel
A drag-to-swipe slider with momentum, spring snapping, animated dots and an optional story-style autoplay. No carousel library involved.
Edge config
Read feature flags in under a millisecond, from every region.
Instant rollbacks
Promote any previous deployment back to production in one click.
Log drains
Stream build and runtime logs to the tools you already use.
Preview comments
Leave feedback directly on preview deployments, pinned to the pixel.
Monorepo support
Only rebuild the apps that changed. Builds got 4x faster on average.
Playground
Tweak the props, the preview and the code follow.
<Carousel>
<CarouselContent>
<CarouselItem>…</CarouselItem>
</CarouselContent>
<CarouselPrevious />
<CarouselNext />
<CarouselDots />
</Carousel>Installation
npx @plumsydev/plum-ui add carouselAlso pulls in button automatically.
Usage
import {
Carousel,
CarouselContent,
CarouselDots,
CarouselItem,
CarouselNext,
CarouselPrevious,
} from "@/components/ui/carousel"<Carousel>
<CarouselContent>
<CarouselItem>…</CarouselItem>
<CarouselItem>…</CarouselItem>
</CarouselContent>
<CarouselPrevious />
<CarouselNext />
<CarouselDots />
</Carousel>Examples
Several per view
Size slides with basis-* classes. loop wraps around at both ends.
Start from a template
Drag, swipe or use the arrow keys.
Autoplay
The active dot fills up like a story. Hovering or focusing the carousel pauses it.
“We moved our whole design system over in an afternoon. The motion is what sold the team.”
“It feels like the components were made by someone who actually ships product.”
“Our onboarding flow got noticeably smoother. Support tickets about it dropped by a third.”
“Owning the code means we never wait on a release to fix a detail.”
Hover to pause
Custom controls
useCarousel() exposes the index, count and navigation anywhere inside the carousel.
API Reference
Carousel
| Prop | Type | Default |
|---|---|---|
loopWrap from the last slide to the first and back. | boolean | false |
autoplayDelay between slides in ms. Pauses on hover, focus and drag. | number | — |
defaultIndexInitial slide. | number | 0 |
onIndexChangeCalled when the active slide changes. | (index: number) => void | — |
CarouselItem
A slide. Use basis-1/2, basis-1/3… to show several per view.
CarouselPrevious / CarouselNext
Button props. Disabled at the ends unless loop.
CarouselDots
Clickable indicators. With autoplay, the active one shows progress.
useCarousel()
Returns index, count, scrollTo, prev, next, canPrev, canNext.
Notes
- Snap points are measured from the real slides, so mixed widths work.
- Swipes are projected with their velocity: a quick flick skips further than a slow drag.
- Arrow keys navigate when focus is inside the carousel; clicks are cancelled after a drag so links don't fire by accident.