Props
| Name | Description |
|---|---|
align Type: "start" | "center"Defaultundefined (the local's own default: start) | Where the current slide sits: |
autoplay Type: number | booleanDefaultfalse | Advance on a timer, in ms ( Keep it for decorative rotation: content the reader must see should not move on its own. See example |
bleed Type: booleanDefaultundefined (no bleed) | Lets the slides run past the carousel to the page edge, while they still snap to and size from the carousel ( |
items Type: number | readonly T[] | The slides as data, rendered through the Photo entries ( |
label Type: string | The carousel's accessible name. Default: the locale's "Carousel". See example |
loop Type: booleanDefaultfalse | An endless run: buttons, keys, autoplay, a swipe and a mouse drag all carry on past the last slide into the first (and back), with no rewind. See example |
modelValue Type: numberDefault0 | The current slide, 0-based, never clamped to a scroll position: the view shows the page that holds it. Out of range, it is brought back and written back. |
perView Type: numberDefaultundefined (the local's own default: 1) | Slides in view; a fraction shows a peek of the next ( For a value per breakpoint, set the |
picker Type: booleanDefaultfalse | A strip that picks the current slide (thumbnails under a big photo on the same Bind the strip and the main carousel to the same |
pt Type: (PtCompoundOf<"", { readonly parts: readonly ["root", "slide", "image", "thumb", "overlay", "prev", "next", "dots", "dot", "pause"]; readonly states: readonly ["current", "disabled", "active"]; readonly wide: readonly []; readonly node: { readonly slide: readonly ["active", "current"]; readonly dot: readonly ["active"]; readonly prev: readonly ["disabled"]; readonly next: readonly ["disabled"]; }; }> & { image?: PtValue | undefined; pause?: PtValue | undefined; next?: PtValue | undefined; root?: PtValue | undefined; slide?: PtValue | undefined; thumb?: PtValue | undefined; overlay?: PtValue | undefined; prev?: PtValue | undefined; dots?: PtValue | undefined; dot?: PtValue | undefined; "slide:active"?: PtValue | undefined; "dot:active"?: PtValue | undefined; "slide:current"?: PtValue | undefined; "next:disabled"?: PtValue | undefined; "prev:disabled"?: PtValue | undefined; }) | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: number | See example |
Events
| Name | Description |
|---|---|
update:modelValue Type: (value: number): void | Emitted with the new value whenever |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
default Type: any | The slides: one per child. |
overlay Type: BbCarouselSlotProps<T | undefined> | A layer on top of each slide (any kind), moving with it: captions, badges, glyphs, buttons. See example |
slide Type: BbCarouselSlotProps<T> | One slide's content, from |
slide:footer Type: BbCarouselSlotProps<T | undefined> | Below each slide's content, inside the slide (any kind of slide): a caption, a price, a link. See example |
slide:header Type: BbCarouselSlotProps<T | undefined> | Above each slide's content, inside the slide (any kind of slide; the built-in image keeps its lazy loading, sizes and crop): a kicker, a title. |