Carousel
ExpressiveA scrollable row of items that resize along keylines: multi-browse, uncontained, multi-aspect, hero or full-screen.
import { Carousel } from '@windmorph/react';Purpose
A carousel is a scrollable row (or column) of items whose sizes change along Compose's keylines as they scroll. Use it to browse a set of images or cards; for a static grid of equal items use a layout utility instead.
The variant is multi-browse (large, medium and small items), uncontained (items of one size that flow past the end edge), multi-aspect (uncontained, with items of their own widths from 9:16 to 16:9), hero (one large item with small ones beside it) or full-screen (one edge-to-edge item at a time, vertical by default). Give the carousel its cross-axis size with className.
On a vertically scrolling page, put a "Show all" button (or an arrow icon button beside the carousel's header) below the carousel, leading to a page of every item, so all items can be seen without scrolling sideways. Don't put buttons inside the carousel or over it.
Windmorph Pro has two rows of its own beside this one: a Shelf for a row of cards with words, paged by arrows at its sides, and a Featured carousel for one large slide at a time at the top of a page, with Previous and Next, and moving by itself with a Pause control.
When not to use
When every item must be seen at once, use a grid of Cards instead.
See also
- Carousel on m3.material.io: Material's own guidelines, with anatomy and specs.
- Card: A container for related content in three forms: static, pressable or a link.
- Tabs: Primary and secondary tab rows with a sliding indicator, scrollable when they overflow.