Data Display · ui · 8K

Carousel

shadcn's Embla carousel with scroll-bar arrows for previous and next (hollow, filled while pressed, empty at the ends) and a CarouselIndicator that reads "3 / 12".

Same API as shadcn/ui's Carousel (opts, plugins, orientation, setApi, useCarousel) plus CarouselIndicator and a label prop on the arrows. useCarousel() also returns selectedIndex and snapCount. Under prefers-reduced-motion the arrows jump instead of scrolling.

Install

pnpm dlx shadcn@latest add @s7ui/carousel

Example

Gray
Light
Dark
Dots
Diagonal
Weave
Bricks

Info

Files:
components/ui/carousel.tsx
Uses:
@s7ui/theme, @s7ui/pixel-glyphs
Packages:
embla-carousel-react