Media
Galleria
Images with thumbnails, indicators, rotation and a full-screen mode.
WAI-ARIA tested
Import
main.ts
import { Galleria } from '@vitral/vue';Thumbnails
1 of 8
Photograph 1
Transitions
How one picture gives way to the next, by name. The presets are defined once and shared with Carousel, and every one of them stops under prefers-reduced-motion.
1 of 8
Indicators and rotation
1 of 8
Full screen
API
Read from packages/vue/src/components/Galleria/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| value | any[] | — |
| numVisible | number | Thumbnails shown at once. Defaults to 3. |
| fullScreen | boolean | Show in a modal over the page, opened with `v-model:visible`. |
| showThumbnails | boolean | Defaults to true. |
| thumbnailsPosition | 'bottom' | 'top' | 'left' | 'right' | — |
| showItemNavigators | boolean | Previous and next buttons on the item. |
| showThumbnailNavigators | boolean | Previous and next buttons beside the thumbnails. Defaults to true. |
| showIndicators | boolean | Dots under the item. |
| circular | boolean | Wrap round: the last item is followed by the first. On by default — a gallery that stops dead at the end sends the reader back through everything they have just seen to reach the other end of it. |
| autoPlay | boolean | Rotate through the items; a pause button comes with it. |
| transitionInterval | number | Milliseconds between items when playing. Defaults to 4000. |
| transition | TransitionPreset | How one item gives way to the next: `'fade'`, `'slide'`, `'push'`, `'cover'`, `'zoom'`, `'flip'`, or `'none'`, which is the default — a gallery being browsed quickly is better off swapping at once. |
| ariaLabel | string | Names the gallery. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| update:activeIndex | index: number | — |
| update:visible | visible: boolean | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| item | (props: { item: unknown; index: number }) | — |
| thumbnail | (props: { item: unknown; index: number }) | — |
| caption | (props: { item: unknown; index: number }) | — |
| indicator | (props: { index: number; active: boolean }) | — |
| header | — | — |
| footer | — | — |