Carousel
A row of items that scrolls and snaps natively, with optional arrows over it, upcoming items and a pagination under it. Items may differ in size: the carousel measures them. The Svelte component draws one item per entry of `items`; the index is never bound — `goto` / `prev` / `next` move, `onindex` tells (ADR 0011).
| Class | Effect | Type |
|---|---|---|
.carousel | A row of items that scrolls and snaps natively, with optional arrows over it, upcoming items and a pagination under it. Items may differ in size: the carousel measures them. The Svelte component draws one item per entry of `items`; the index is never bound — `goto` / `prev` / `next` move, `onindex` tells (ADR 0011). | root |
.carousel-start.carousel-center.carousel-end | Sets align, one class per value.
| axis align |
.carousel-vertical | Items go up and down; the arrows sit at the top and the bottom. | flag |
.carousel-item | One item. As wide as the track, unless `--carousel-item-width` says otherwise (`auto`: the item sizes itself). | part |
.carousel-next | The cell the next arrow is drawn in, over the end of the track. | part |
.carousel-pagination | The cell under the track the pagination is drawn in. | part |
.carousel-prev | The cell the previous arrow is drawn in, over the start of the track. | part |
.carousel-track | The scrolling, snapping row. Focusable, so the arrow keys move through it. | part |
.carousel-upcoming | The row of upcoming items under the track. | part |
.carousel-upcoming-item | One upcoming item: a button drawing the item again at `--carousel-upcoming-size`. | part |