Carousel

A dynamic component that presents a rotating display of content items within a confined space.

1
2
3
4
5

Usage

1
2
3
4
5

Installation

bash npm install @holo/carousel

Import

import {
  Card,
  CardContent,
  Carousel,
  CarouselContent,
  CarouselItem,
  CarouselNext,
  CarouselPrevious,
} from "@holo/core";

Options

Orientation

Use the orientation prop to define the carousel's orientation

1
2
3
4
5

Size

Apply the basis utility class on the <CarouselItem /> to adjust the item size.

1
2
3
4
5

Spacing

Apply the pl-[VALUE] utility on the <CarouselItem /> and a negative -ml-[VALUE] on the <CarouselContent /> to set the spacing between items.

Apply the pl-[VALUE] utility on the <CarouselItem /> and a negative -ml-[VALUE] on the <CarouselContent /> to set the spacing between items.

1
2
3
4
5

Api

Utilize a state and the setApi props to acquire an instance of the carousel API.

1
2
3
4
5
Slide 0 of 0

Plugin

Integrate plugins into the carousel effortlessly by using the plugins prop.

1
2
3
4
5