className | string | Partial<Record<"track" | "carousel", string>> | ClassNameComponent<CarouselInterface> | No | — | Root classes (string), static element classes (object), or state-aware element classes (function). |
variant | "hero" | "center-aligned" | "multi-browse" | "un-contained" | "full-screen" | No | 'hero' | Carousel layout variant. Only `hero` is implemented today; the other Material 3 arrangements are reserved and will be supported in the future. |
gap | number | No | 8 | Gap between items, in pixels. |
scrollSensitivity | number | No | 1.25 | Adjusts scroll/drag responsiveness. |
outputRange | [number, number] | No | [42, 300] | Min/max item width, in pixels. |
index | number | No | — | Index of the centered item. A value other than `undefined` makes the carousel controlled: it becomes the single source of truth and user interaction only notifies via `onIndexChange` instead of moving the carousel locally. |
defaultIndex | number | No | 0 | Initial centered index for uncontrolled usage. |
onIndexChange | (index: number) => void | No | — | Called once for each accepted centered-index transition. |
onMetricsChange | (metrics: CarouselMetrics) => void | No | — | Receive live metrics to better control the carousel externally |