Rebar UI

1.0

synthetic

Carousel

One slide at a time, with arrows, dots and an N of M count. Keep every slide the same shape.

Harbour rebrand photosFour slides at one aspect ratio
Two slides
Single slide

In context

Project galleryPhotos from the project, with the file list beside them
Harbour rebrand

van-livery-photos.zip, mark-stacked.svg

Props

PropTypeRequiredDefault
childrenReactNode[]Yes—
classNamestring | undefinedNo—
defaultIndexnumber | undefinedNo0
indexnumber | undefinedNo—
onIndexChange((index: number) => void) | undefinedNo—
aria-labelstring | undefinedNoCarousel

Accessibility

Root is role="region" with aria-roledescription="carousel"; each slide is a role="group" labelled "N of M" and hidden while off-screen. Left and right arrows navigate when focused; the position text is aria-live="polite".

data-rebar-* attributes

data-rebar-component="carousel" on the root; data-rebar-part values viewport, track, slide, controls and dots.

Migrating to Ant Design

Not codemod-covered. AntD's carousel is slide-count driven rather than children driven, so this is a structural rewrite.