Skip to content

Carousel

The WAI-ARIA carousel: slides with previous / next buttons, indicators, swiping, and automatic rotation with its rotation control.

Styled with CSS Tailwind

Autoplaying slides

The root is a region with aria-roledescription="carousel"; each slide a group named "2 of 4"; slides out of view are inert. The carousel rotates every AutoplayInterval ms, pauses while hovered and stops for good when keyboard focus enters it, as the APG asks - the rotation control (first in the tab order) starts it again. Drag the slides to swipe. The track is moved by the root's --bit-bh-carousel-index alone.

Several slides in view

SlidesPerView shows several slides at once and SlidesPerMove sets how far a button or a swipe moves; without Loop the buttons disable at the ends.

An unhandled error has occurred. Reload 🗙