1. Components
  2. Carousel

Components

Tailwind CSS Carousel

The Carousel Component provides a smooth and interactive way to cycle through content, whether it be images or text, mimicking the captivating motion of a traditional carousel.

Requires JS

Note that this component requires the use of our Carousel plugin, else you can skip this message if you are already using Preline UI as a package.

Basic usage

A slideshow component for cycling through elements-images or slides of text-like a carousel.

Theme:

Pagination

Display carousel slides with pagination dots for enhanced navigation and visual indicators.

Theme:

AutoPlay

Use "isAutoPlay": true to enable the autoplay feature.

Theme:

Infinite loop

Use "isInfiniteLoop": true to enable infinite looping.

Theme:

isRTL

Use "isRTL": true to enable the rtl feature.

Theme:

Multiple slides

Carousel with multiple slides.

Theme:

Centered

Use "isCentered": true to enable centering relative to the center of the carousel.

Theme:

Draggable

Use "isDraggable": true to enable dragging option. This doesn't work if isSnap is enabled.

Theme:

Auto height

Use "isAutoHeight": true to enable recalculation of the carousel height on each slide change.

Theme:

Snap point

Use "isSnap": true to enable scrolling and centering relative to the center of the carousel. You need to add snap-x snap-mandatory classes to hs-carousel and snap-center classes to each hs-carousel-slide.

Theme:

Info

Add hs-carousel-info inside data-hs-carousel and place hs-carousel-info-current and hs-carousel-info-total inside hs-carousel-info to display information about the current and total number of slides.

Theme:

Thumbnails (horizontal)

Carousel with horizontal thumbnails.

Theme:

Thumbnails (vertical)

Carousel with vertical thumbnails.

Theme:

Destroy and Reinitialize

Provides destroy method that helps to destroy a carousel.

Theme: