Carousel: Links and focusable content
Dragging a link with the mouse scrolls without opening it. Tabbing to a slide that is off screen scrolls it into view.
This adds the example as components/examples/carousel/links.tsx, together with the Carousel component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/carousel-links.jsonTo add only the component, follow the Carousel installation.
Props in this example
The Carousel props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
spacingGap between slides. | "none" | "sm" | "default" | "lg" | "default" |
Every prop is in the Carousel API reference.
- API
- Several per view
- Dots and counter
- Autoplay
- Thumbnails
- Vertical
- Controlled
- Rewind and start index
- Adding and removing slides
- Nested
- Long content and a single slide
- Right to left
See them all, with keyboard support and accessibility notes, on the Carousel page.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- Number flowAnimated numbers where only the changed digits spin, with any Intl format and locale.
- AccordionStacked headings that each reveal a panel, with height motion you can reverse mid-way and panels that stay searchable while closed.
- Aspect ratioA box that holds its shape before media loads, shimmers while loading, fades the media in and falls back when it fails.
- CollapsibleA panel that shows and hides with height motion you can reverse mid-way, without jumping the layout.
- ResizablePanels you can drag apart, with a quiet divider that wakes up on hover, sizes that glide on reset or collapse, and layouts that persist.