Carousel

A slideshow component for cycling through elements—images or text—like a carousel.

When To Use

When there is a group of content on the same level. When there is insufficient content space, it can be used to save space in the form of a revolving door. Commonly used for a group of pictures/cards.

Example Usage

1
2
3
4

Autoplay

You can enable automatic cycling by adding the `autoplay` prop. You can control the speed using `autoplayInterval` (in ms, defaults to 3000). Hovering over the carousel automatically pauses it.

A
B
C

Controls & Aspect Ratio

Use the `showControls` prop to display navigation arrows. The `aspectRatio` prop helps enforce consistent dimensions (`video`, `square`, or `auto`).

1
2

API Reference

Property
Description
Type
Default

autoplay

Whether to automatically cycle through the items. boolean false

autoplayInterval

The interval in milliseconds for autoplay. number 3000

showDots

Whether to show the pagination dots. boolean true

showControls

Whether to show the next/previous navigation arrows. boolean false

aspectRatio

Enforces a specific aspect ratio for the carousel. 'video' | 'square' | 'auto' 'auto'

class

Additional CSS classes to apply to the carousel container. string -