Skip to content

Carousel

Carousels cycle through images or other content. Add controls with data-ui-slide, indicators with data-ui-slide-to, captions, a fade transition or the dark variant, and start autoplay with data-ui-ride="carousel". Keep slides few and meaningful.

1Slides only

The simplest carousel: slides that cycle automatically, without controls.

2With controls

Previous and next buttons with data-ui-slide.

3With indicators

Indicator buttons with data-ui-slide-to jump straight to a slide.

4With captions

carousel-caption adds a heading and text over each slide (hidden on phones).

5Crossfade

carousel-fade fades between slides instead of sliding.

6Autoplay

data-ui-ride="carousel" starts cycling on page load; hovering pauses it.

7Per-slide interval

data-ui-interval on each item sets how long that slide stays (in ms).

8Dark variant

data-ui-theme="dark" gives dark controls, indicators and captions for light images.

9Hero banner

Wide slides with left-aligned headline and call to action, shown on all screen sizes.

10No touch swiping

data-ui-touch="false" turns off swipe, useful when slides contain draggable content.

11Testimonial slider

Text-only slides with customer quotes; dark controls sit on the light panel.

12Product slider

Several product cards per slide; on phones one card per slide is shown.

13Thumbnail navigation

Image thumbnails below the slides act as indicators, like a product gallery.

14Inside a card

A carousel as the media area of a card, with rounded top corners.

Oslo loft
4.6

$130.37 per night

15Caption below the image

Text under each image and custom buttons outside the slides, e.g. an onboarding walkthrough.

16Announcement bar

A slim text-only carousel that rotates short announcements.

17Keep playing on hover

data-ui-pause="false" keeps the autoplay running when the pointer is over the slides.

18Fixed aspect ratio

A ratio wrapper with object-fit keeps every slide the same 21:9 shape whatever the image size.

19Gallery with counter, no wrap

A position badge on each slide; data-ui-wrap="false" stops at the first and last photo.

20Pill indicators

Custom-styled indicators: the active one stretches into a pill in the theme colour.