# 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.

Package: `@kela-systems/ui-components` 4.1.0

```tsx
import { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, useCarousel } from "@kela-systems/ui-components";
```

Links (Kela sign-in needed): [Storybook](https://main--6af1efd9453270bb59a6c00c.chromatic.com/?path=/docs/components-carousel--docs), [Source](https://github.com/Kela-Systems/kela/tree/main/packages/next/ui-components/src/carousel), [Figma](https://www.figma.com/design/anhlwrbFM6mUiL0klxeK1I/ARK---Design-System?node-id=46-66)

## Props

A `className` on a part adds layout only: placement, sizing and spacing. Pick a look with a variant.

### Carousel

| Variant | Values | Default |
| --- | --- | --- |
| `orientation` | `horizontal`, `vertical` | `horizontal` |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `opts` | `CarouselOptions` |  |  |
| `plugins` | `CarouselPlugin` |  |  |
| `setApi` | `(api: CarouselApi) => void` |  |  |

Also takes the attributes of the HTML element it renders.

### CarouselContent

Also takes the attributes of the HTML element it renders.

### CarouselItem

Also takes the attributes of the HTML element it renders.

### CarouselPrevious

| Variant | Values | Default |
| --- | --- | --- |
| `variant` | `default`, `secondary`, `destructive`, `outline`, `ghost`, `link` | `outline` |
| `size` | `default`, `xs`, `sm`, `lg`, `icon`, `icon-xs`, `icon-sm`, `icon-lg` | `icon-sm` |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `loading` | `boolean` |  | Shows a spinner and prevents interaction while keeping the variant's resting colors. |

Also takes the props of `@base-ui/react/button`.

### CarouselNext

| Variant | Values | Default |
| --- | --- | --- |
| `variant` | `default`, `secondary`, `destructive`, `outline`, `ghost`, `link` | `outline` |
| `size` | `default`, `xs`, `sm`, `lg`, `icon`, `icon-xs`, `icon-sm`, `icon-lg` | `icon-sm` |

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `loading` | `boolean` |  | Shows a spinner and prevents interaction while keeping the variant's resting colors. |

Also takes the props of `@base-ui/react/button`.

### Also exported

- `useCarousel` (hook)
