0.7.2

WidgetSwiperPhotoSlider

Source code

.

Usage

  1. Import photoswipe styles into root layout (Page Layout.astro components)
---
import "photoswipe/style.css";
---
  1. Add to astro config file
import { defineConfig } from 'astro/config';

export default defineConfig({
  vite: {
    ssr: {
      noExternal: ['photoswipe'],
    }
  }
})
---
import { WidgetSwiperPhotoSlider } from '@yatoday/astro-ui/astro';
---

<!-- All images in the directory /src/assets/images/folder_01 will be added to the gallery -->
<WidgetSwiperPhotoSlider imagesFolder="folder_01" />

Props

PropTypeDefaultDescription
imagesFolderstring-Path to the folder with images relative to /src/assets/images/{imagesFolder}
idstringjs randomBy default, the id is generated automatically. If you decide to specify this parameter yourself, make sure that it is unique on the page
titlestring-Title prop in Headline component
subtitlestring-Subtitle prop in Headline component
taglinestring-Tagline prop in Headline component
isAfterContentbooleanfalse-
isDarkbooleanfalseAdds the dark CSS class to the WidgetWrapper
bgstring-Set background element
isAfterContentbooleanfalse-
withNavigationbooleantrueNavigation visibility
classes.containerstring-CSS classes for the WidgetWrapper container
classes.loadingstring-CSS classes for loading layout
classes.headline.{...}string-CSS classes for the Headline component
autoplaybooleanfalseObject with autoplay parameters or boolean true to enable with default settings
...restany-…rest params from Swiper js parameters