Options
There are Plugin Options and Swiper Options.
Note: String parameters do not begin with a : but all other types do.
Plugin Options
You must provide :slides or a base-url but not both.
| Property Name | Default Value | Type | Description of Value |
|---|---|---|---|
| :slides | or base-url | Array | Base URL for image sources |
| base-url ¹ | or :slides | String | Base URL for image sources |
| :number-of-slides ¹ | 1 | Number | Number of slides to generate |
| :start-at ¹ | 1 | Number | Number to start generation |
| file-ext ¹ | .jpg | String | Extension for file names |
| :pad-start ¹ | 1 | Number | Pad file names with 0's |
| file-name-prefix ¹ | | String | Prefix for file names |
| alt-text-prefix | Loading | String | Prefix for alt attributes |
| button-text | View in Fullscreen | String | Text for fullscreen button |
| no-fullscreen | false | Boolean | Disable fullscreen button |
| height | null | String | CSS height (default: auto) |
| margin | null | String | CSS margin |
| background-color | var(--vp-code-block-bg) | String | CSS background-color |
| border-radius | 8px | String | CSS border-radius |
¹ Only used with Dynamic URL's
Swiper Options
Swiper Parameters: https://swiperjs.com/swiper-api#parameters
| Property Name | Default | Type | Description of Value |
|---|---|---|---|
| :slides-per-view | 1 | Number | Number of slides shown per view |
| :space-between | 0 | Number | Space between slides in pixels |
| :lazy-preload-prev-next | 1 | Number | Number of lazy loaded slides |
| :breakpoints | null | Object | Breakpoints parameters |
| :pagination | true | Object | Pagination parameters |
| :keyboard | true | Boolean | Enable keyboard navigation |
| :mousewheel | true | Boolean | Enable mouse wheel navigation |
| :navigation | true | Boolean | Enable side navigation arrows |
| :grab-cursor | true | Boolean | Enable grab cursor on hover |
| :loop | true | Boolean | Enable continuous loop |
| :autoplay | false | Object | Can be true or parameters |
| :centered-slides | false | Boolean | Center slides vs left aligned |
| :direction | horizontal | String | If vertical must set height |
| :initial-slide | 0 | Number | Initial slide index |
| :one-way-movement | false | Boolean | Only allow swiping forward |
| :speed | 300 | Number | Slide transition speed in ms |
| effect | slide | String | coverflow, cube, fade, flip |
| :coverflow-effect | { } | Object | EffectCoverflow parameters |
| :cube-effect | { } | Object | EffectCube parameters |
| :fade-effect | { } | Object | EffectFade parameters |
| :flip-effect | { } | Object | EffectFlip parameters |
See the Usage guide or the Examples for details on using the <VPSwiper> tag.
If your images are named numerically and sequentially, check out the Dynamic URL's guide.
❔ ADDITIONAL OPTIONS
If you need more options, please request a feature.
