Content
Container for carousel slides; includes viewport and slide container
| Prop | Type | Default |
|---|---|---|
| className# | stringCSS class name | — |
| ...rest# | React.ComponentPropsWithoutRef<'div'>All standard HTML div attributes and event handlers | — |
The full prop reference for the Carousel component. A slideshow for cycling through images or content.
import { Carousel } from '@structyl/styled';The root carousel container that manages state, navigation, and autoplay
| Prop | Type | Default |
|---|---|---|
| loop# | booleanEnable wrapping navigation (cycles back to start when reaching end) | false |
| autoPlay# | numberAutoplay interval in milliseconds; pauses on hover | — |
| slideCount# | numberTotal number of slides (used by Dots/Counter components) | 0 |
| index# | numberControlled current slide index | — |
| defaultIndex# | numberInitial slide index when uncontrolled | 0 |
| onIndexChange# | (index: number) => voidCallback fired when active slide index changes | — |
| className# | stringCSS class name | — |
| asChild# | booleanRender as child element (primitives only) | — |
| orientation# | 'horizontal' | 'vertical'Carousel direction (primitives only) | 'horizontal' |
| ...rest# | React.ComponentPropsWithoutRef<'div'>All standard HTML div attributes and event handlers | — |
Container for carousel slides; includes viewport and slide container
| Prop | Type | Default |
|---|---|---|
| className# | stringCSS class name | — |
| ...rest# | React.ComponentPropsWithoutRef<'div'>All standard HTML div attributes and event handlers | — |
Individual carousel slide container
| Prop | Type | Default |
|---|---|---|
| className# | stringCSS class name | — |
| ...rest# | React.ComponentPropsWithoutRef<'div'>All standard HTML div attributes and event handlers | — |
Button to navigate to previous slide; auto-disabled when at start and loop is false
| Prop | Type | Default |
|---|---|---|
| className# | stringCSS class name | — |
| ...rest# | React.ComponentPropsWithoutRef<'button'>All standard HTML button attributes and event handlers | — |
Button to navigate to next slide; auto-disabled when at end and loop is false
| Prop | Type | Default |
|---|---|---|
| className# | stringCSS class name | — |
| ...rest# | React.ComponentPropsWithoutRef<'button'>All standard HTML button attributes and event handlers | — |
Dot indicators for slide navigation; shows current position and allows direct navigation
| Prop | Type | Default |
|---|---|---|
| count# | numberNumber of slides; falls back to slideCount from Root context | — |
| className# | stringCSS class name | — |
| ...rest# | React.HTMLAttributes<HTMLDivElement>All standard HTML div attributes | — |
Slide counter display showing current position (e.g., '3 / 5')
| Prop | Type | Default |
|---|---|---|
| count# | numberTotal number of slides; falls back to slideCount from Root context | — |
| className# | stringCSS class name | — |
| ...rest# | React.HTMLAttributes<HTMLSpanElement>All standard HTML span attributes | — |
If you didn't find what you need here, read the component implementation .