@slidy/plugins
v1.2.0
Published
Simple plugins functions for @slidy/core
Downloads
30
Maintainers
Readme
@slidy/plugins
Plugins functions for @slidy/core script.
Try the DEMO
Getting started 🚀
The package is available via NPM:
npm i -D @slidy/plugins
or from CDN:
<script src="https://unpkg.com/@slidy/plugins"></script>
Usage
Plugin functions available via named import as MJS/CJS
module or via global Window.Slidy
object props as IIFE
.
export type PluginArgs = {
node: HTMLElement,
options: Options,
instance: SlidyInstance
}
type PluginFunc = (args: PluginArgs) => void;
MJS/CJS module import
<head>
<script type="module">
import * as plugins from 'https://unpkg.com/@slidy/plugins/dist/index.mjs'; // MJS module
// OR
import * as plugins from 'https://unpkg.com/@slidy/plugins/dist/index.cjs'; // CJS module
</script>
</head>
IIFE as Window
Object
<head>
<script src="https://unpkg.com/@slidy/plugins/dist/index.js"></script>
</head>
<script>
window.onload = () => marquee = SlidyPlugins.marquee()
</script>
As third party module in any frameworks
<!-- Svelte -->
<script>
import { marquee } from '@slidy/plugins';
<Slidy plugins={[marquee]} />
</script>
MIT © Valexr