Carousel
Scroll-snap slider
A row of slides people swipe or step through — key visuals, episode stills. Only the first slide is sure to be seen, so don't put anything essential after it; for a set people should browse, a Gallery grid shows everything.
Basic
1
2
3
4
5
Peek
1
2
3
4
5
6
7
- Native scroll snapping underneath, so touch swipe and trackpads work as expected, including right-to-left pages.
arrowsanddotsstep through; each dot names its slide.
Usage
ts
import { BlessCarousel } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
perView | number | 1 | slides per view; fractional ok (1.2 = peek) |
gap | string | "var(--bless-space-3)" | |
loop | boolean | false | |
autoplay | number | 0 | ms; 0 = off |
dots | boolean | true | |
arrows | boolean | true | |
label | string | "Carousel" | |
prevLabel | string | "Previous slide" | |
nextLabel | string | "Next slide" | |
pauseLabel | string | "Pause slides" | the autoplay button's name; its pressed state says whether it's paused |
modelValue | number | 0 |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: number] |
Slots
| Name | Scope | Description |
|---|---|---|
default | — |
Exposed
| Name | Type | Description |
|---|---|---|
go | (i: number, smooth?: boolean) => void | |
next | () => void | |
prev | () => void |