Getting Started
Foundations
Components
Search for a command to run...
Carousels provide an engaging way to display multiple items in a limited space, allowing users to navigate through content horizontally or vertically. They support touch gestures, keyboard navigation, and automatic playback, making them ideal for image galleries, testimonials, or featured content.
import { Carousel } from "@strongtie/design-system/carousel"This module exports the following components:
CarouselCarouselContentCarouselItemCarouselNextCarouselPrevious<Carousel>| Prop | Type | Default | Description |
|---|---|---|---|
opts | Partial<OptionsType> | - | |
orientation | horizontal | vertical | - | |
plugins | CreatePluginType<LoosePluginType, {}>[] | - | |
setApi | ((api: EmblaCarouselType) => void) | - |
<CarouselNext>| Prop | Type | Default | Description |
|---|---|---|---|
size | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | - | |
variant | "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | - |
<CarouselPrevious>| Prop | Type | Default | Description |
|---|---|---|---|
size | "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | - | |
variant | "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | - |
Components can be styled using the className prop. The design system uses Tailwind CSS for styling.
CSS classes used by this component:
carouselcarousel-contentcarousel-itemcarousel-nextcarousel-previousEnsure proper accessibility attributes are added when implementing this component.