@miletorix/vitepress-gallery
vitepress-gallery
A responsive, swipeable image gallery component for VitePress with thumbnails, navigation, captions, and smooth transitions.
Installation
npm i @miletorix/vitepress-gallery
Usage
Configuration
// docs/.vitepress/theme/index.ts
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { Gallery } from '@miletorix/vitepress-gallery' // [!code ++]
import '@miletorix/vitepress-gallery/style.css' // [!code ++]
export default {
extends: DefaultTheme,
enhanceApp(ctx) {
ctx.app.component('Gallery', Gallery) // [!code ++]
}
}
Gallery
<Gallery
:images="[
'demo-1.png',
'demo-2.jpg',
'demo-3.jpg',
'demo-4.jpg'
]"
:captions="[
'Image caption Nr.1 ...',
'Image caption Nr.2 ...',
'Image caption Nr.3 ...',
'Image caption Nr.4 ...'
]"
/>
Captions are optional.
Alt text by default if captions are not specified - Image 1, Image 2, Image ... etc. If captions are specified, then alt = captions
Related Packages
vue2-datetime-picker
vue2-datetime-picker is a vue2.0 compatible date time picker component. It is a...
1,011
1
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.1 | ^3.0.0 | MIT | |
| 1.0.0 | ^3.0.0 | MIT | |
| 0.0.7 | ^3.0.0 | MIT | |
| 0.0.6 | ^3.0.0 | MIT | |
| 0.0.5 | ^3.0.0 | MIT | |
| 0.0.4 | ^3.0.0 | MIT | |
| 0.0.3 | ^3.0.0 | MIT | |
| 0.0.2 | ^3.0.0 | MIT | |
| 0.0.1 | ^3.0.0 | MIT |