Skip to content
Alea0.1

Data display

Carousel

Slides you swipe or step through, with dots and an autoplay people can stop.

Ant Design: Carousel

import { Carousel } from '@alea/ui';

Examples

Carousel

Arrows, dots, swipe; autoplay stops on hover, focus and with the button.

Several per view

perView shows more than one at once.

Props

Accessibility

  • The WAI-ARIA carousel pattern: a labelled region of slides, "n of m".
  • Autoplay stops on hover and focus, never runs with reduced motion, and has a stop button.
  • Slides out of view are inert.

Keyboard

KeyDoes
TabFocuses the slides, then the controls
Arrow Left / RightPrevious or next slide
SpacePauses autoplay (on the pause button)

Do and don't

Do

  • Keep autoplay off unless the content is decorative.

Don't

  • Don't put critical content only in later slides.
Tested with axe, keyboard and screen reader roles