bloxa

Carousel

FREE

Scroll-snap slider with swipe, mouse drag, arrows, dots, autoplay and loop. No carousel library.

Installation

Terminal
npx @bloxa/cli add carousel
# or: npx shadcn@latest add @bloxa/carousel

Examples

Autoplay and multiple per view

Swipe, drag with a mouse or use the arrow keys.

1
2
3
4
5
6
1
2
3
4
5
6
7
8
9

API reference

Every component also accepts the props of the element it renders.

Carousel

Put CarouselContent (holding CarouselItems), CarouselControls and CarouselDots inside. useCarousel() exposes the state.

PropTypeDefaultDescription
perViewnumber1Slides visible at once.
gapstring"1rem"Gap.
loopbooleanfalseWrap around.
autoplaynumber—Auto-advance in ms; pauses on hover.
labelstring—Accessible name.