Carousel
Lets people move through a sequence of related panels within a limited space. Use it for small collections where viewing one item at a time is useful.
React
Ready
Figma
Import
import { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, useCarousel } from "@kela-systems/ui-components";This page has no live example yet. Storybook shows Carousel in every state and theme.
Props
Carousel
| Name | Default | Description |
|---|---|---|
orientation"horizontal" | "vertical" | "horizontal" | |
optsCarouselOptions | ||
pluginsCarouselPlugin | ||
setApi(api: CarouselApi) => void |
It also takes the attributes of the HTML element it renders.
CarouselContent
No props of its own. It also takes the attributes of the HTML element it renders.
CarouselItem
No props of its own. It also takes the attributes of the HTML element it renders.
CarouselPrevious
| Name | Default | Description |
|---|---|---|
variant"default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "outline" | |
size"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-sm" | |
loadingboolean | Shows a spinner and prevents interaction while keeping the variant's resting colors. |
It also takes the props of Base UI's button.
CarouselNext
| Name | Default | Description |
|---|---|---|
variant"default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "outline" | |
size"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-sm" | |
loadingboolean | Shows a spinner and prevents interaction while keeping the variant's resting colors. |
It also takes the props of Base UI's button.
Also exported: useCarousel (hook).