1.0.0 • Published 10 months ago

@newlogic-digital/swup-plugins v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Swup Plugins

Usage

import { SwupCorePlugin } from '@newlogic-digital/swup-plugins'

new Swup({
    plugins: [new SwupCorePlugin()]
})

Info

SwupCorePlugin

1. Adds default options

{
    ignoreVisit: (url, { el }) => el?.closest('[data-no-swup], [data-naja]'),
    animationSelector: '.view-transition-main'
}

2. Adds support for data-swup-replace attribute, replaces attribute upon content replace

<meta name="description" content="Replace me" data-swup-replace>

3. Scroll is restored to top upon navigation

4. Adds default gtag page_view event to dataLayer upon navigation

5. Adds data-loading attribute to x-button or spinner cursor upon no-swup navigation

6. Prunes cache after 1 minute

1.0.0

10 months ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago