UNPKG

@flexilla/alpine-offcanvas

Version:

AlpineJS plugin for adding offcanvas functionality to your AlpineJS components

46 lines (26 loc) 757 B
<h1 align="center">Alpine Offcanvas</h1> <p align="center"> Simple Interactif Offcanvas Directive for <a href="https://alpinejs.dev">Alpine.js</a> </p> ## Installation ### CDN Include the following `<script>` tag in the `<head>` of your document, just before Alpine. ```html ``` ### NPM ```shell npm install @flexilla/alpine-offcanvas ``` Add the `x-offcanvas` directive to your project by importing the package **before** starting Alpine. ```js import Alpine from 'alpinejs'; import PluginOffcanvas from '@flexilla/alpine-offcanvas'; Alpine.plugin(PluginOffcanvas); Alpine.start(); ``` ## Usage ```html ``` ## License Copyright (c) 2025 Johnkat MJ and contributors. Licensed under the MIT license, see [LICENSE](LICENSE) for details.