Name the carousel with aria-label. Give each CarouselItem a basis-* class to show several slides at once.
trip-photos.tsx
Carousel
<section>| Prop | Type | Default | Description |
|---|---|---|---|
| opts | Partial<OptionsType> | — | Embla options (loop, align, slidesToScroll, dragFree, startIndex, breakpoints). |
| plugins | CreatePluginType<LoosePluginType, {}>[] | — | Embla plugins (autoplay, auto height, class names, wheel gestures). |
| orientation | "horizontal""vertical" | "horizontal" | |
| set | — | Gets the Embla API once it starts, for your own controls and events. | |
| slide | defaultSlideLabel | The name of each slide for screen readers. Translate it. Default: "2 of 5". | |
| status | defaultStatusLabel | The name of each dot. Translate it. Default: "Slide 2 of 5". | |
| labels | — | The words of the parts (CAROUSEL_LABELS). Keep the object stable. | |
| ...props | <section> attributes | — | Every other attribute goes to the <section>, with a ref. |
CarouselContent
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
CarouselItem
<fieldset>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <fieldset> attributes | — | Every other attribute goes to the <fieldset>, with a ref. |
CarouselPrevious
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| rounded | "default""full" | "full" | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | "icon" | |||||
| position | "inside""outside""static" | — | |||||
| class | string | — | |||||
| variant | "outline" | A Button variant, or dark, light, clear (the Button media glass) on a picture. | |||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
CarouselNext
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| rounded | "default""full" | "full" | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | "icon" | |||||
| position | "inside""outside""static" | — | |||||
| class | string | — | |||||
| variant | "outline" | A Button variant, or dark, light, clear (the Button media glass) on a picture. | |||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
CarouselDots
<div>CarouselCounter
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
| → | Moves to the next stop when the focus is in the carousel. In right to left, it moves to the previous stop. |
|---|---|
| ← | Moves to the previous stop. In right to left, it moves to the next stop. |
| ↓ | Moves to the next stop in a vertical carousel. |
| ↑ | Moves to the previous stop in a vertical carousel. |
| Tab | Moves the focus to Previous, Next, the dots, and the links in the slides. |
Built with
Installs with Carousel
- Components
- Button



