structyl

Carousel

stable

A slideshow for cycling through images or content.

Basic usage

1
2
3

Examples

Card carousel

Wrap card content in each slide for a scrollable feature list.

Components

50+ accessible primitives

Themes

CSS variable token system

DataTable

Full-featured data grid

Content carousel

Carousel supports looping content cards with previous and next controls.

1
Design tokens
2
Accessible primitives
3
Playground coverage
4
Docs examples

Features

  • Horizontal / vertical.
  • Loop + autoplay.

Installation

bash
pnpm dlx structyl add carousel

API Reference

Carousel.Root

An image / content slider.

PropTypeDefault
orientation'horizontal' | 'vertical'

Slide axis.

'horizontal'
loopboolean

Whether it wraps around.

false
indexnumber

Controlled active slide.

onIndexChange(index: number) => void

Called when the slide changes.

autoPlayIntervalnumber

Autoplay interval in ms.

Carousel.Content

The slide track.

PropTypeDefault

Carousel.Item

A single slide.

PropTypeDefault

Carousel.Previous

Goes to the previous slide.

PropTypeDefault

Carousel.Next

Goes to the next slide.

PropTypeDefault
Carousel | structyl