Skip to Content
Data & Media@hacline/ui/carousel

Carousel

Display a collection of content in a scrollable paginated view.

Usage

Switch between project phases using the previous, next, or pagination indicator controls. Carousel pages are 1-based, and CarouselContent inside CarouselViewport holds each slide card.

Design researchOrganize interview notes
Interactive prototypeComplete initial user flows
Project reviewConfirm iteration scope

Autoplay Controls

Start or pause playback with CarouselPlayToggle. The carousel loops back to the first slide after reaching the last one.

Review this week's tasks
Check docs awaiting review
Sync completed items

Parts

PartDescription
CarouselContent
The row, or column, of slides inside the viewport.
CarouselIndicator
Shows a page and goes to it. Indicators past the page count hide themselves.
CarouselIndicatorGroup
The indicators, as a tablist with one tab stop. Its children can be a function of the state.
CarouselItem
One slide. It's labelled "1 of 5" unless it has an aria-label, and inert while out of view.
CarouselNext
Goes to the next page. aria-disabled on the last page without loop, where it stays focusable.
CarouselPlayToggle
Starts and stops rotation. Label it from playing in its state, as the carousel pattern asks.
CarouselPrevious
Goes to the previous page. aria-disabled on the first page without loop, where it stays focusable.
CarouselViewport
The scrolling window onto the slides. Touch, wheels and keys scroll it natively.

Props

Prop

Type

View UI SDK parts and state attributes.