Update v4.2 - New components, 10+ framework guides, and quality improvements. Visit Changelog

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

Cycle through images or content slides with a basic carousel.

Pagination

Add pagination dots so users can see the current slide and jump between slides.

Autoplay

Use "isAutoPlay": true to advance slides automatically on an interval.

Infinite loop

Use "isInfiniteLoop": true to keep the carousel looping from the last slide back to the first.

RTL

Use "isRTL": true for right-to-left slide movement and controls.

Multiple slides

Show multiple slides in view at the same time.

Centered

Use "isCentered": true to keep the active slide centered in the viewport.

Draggable

Use "isDraggable": true to drag slides with the pointer. This does not work when isSnap is enabled.

Auto height

Use "isAutoHeight": true to recalculate the carousel height for each slide.

Snap scrolling

Use "isSnap": true with snap-x snap-mandatory on hs-carousel and snap-center on each hs-carousel-slide to snap slides into place.

Slide counter

Add hs-carousel-info with hs-carousel-info-current and hs-carousel-info-total to display the current slide and total count.

Thumbnails (horizontal)

Use horizontal thumbnails below the carousel as alternate slide controls.

Thumbnails (vertical)

Use a vertical thumbnail rail when the layout has room for side-by-side navigation.

Destroy and reinitialize

Use the destroy method to remove a carousel instance and initialize it again when needed.

© 2026 Preline Labs.