Alpine.js wrapper for @formkit/auto-animate.

Overview

💫 Alpine AutoAnimate 💫

An Alpine.js wrapper for @formkit/auto-animate.

version Build size downloads JSDelivr GitHub Gitmoji

🚀 Installation

CDN

Include the following <script> tag in the <head> of your document, just before Alpine.

<script src="https://cdn.jsdelivr.net/npm/@marcreichel/alpine-auto-animate@latest/dist/alpine-auto-animate.min.js" defer></script>

NPM

npm install @marcreichel/alpine-auto-animate

Add the x-auto-animate directive to your project by importing the package before starting Alpine.

import Alpine from 'alpinejs';
import AutoAnimate from '@marcreichel/alpine-auto-animate';

Alpine.plugin(AutoAnimate);

Alpine.start();

🪄 Usage

Add the x-auto-animate directive to any element where you want to apply animations (including their direct children).

<ul x-auto-animate>
    <li>Lorem</li>
    <li>Ipsum</li>
</ul>

Duration

To adjust the animation duration add a modifier like so:

<ul x-auto-animate.1000ms>
    <!-- ... -->
</ul>

or

<ul x-auto-animate.1s>
    <!-- ... -->
</ul>

Easing function

To adjust the easing function add it as a modifier:

<ul x-auto-animate.linear>
    <!-- ... -->
</ul>

Global config

If you are using the npm installation method for this package or the ESM distribution, you can use the AutoAnimate.configure method to provide a configuration:

import AutoAnimate from '@marcreichel/alpine-auto-animate';

Alpine.plugin(AutoAnimate.configure({
    duration: 1000,
    easing: 'linear',
    disrespectUserMotionPreference: true,
}));

📄 License

Copyright (c) 2022 Marc Reichel and contributors.

Licensed under the MIT license, see LICENSE for details.

You might also like...

IntelliSense for Alpine.js

IntelliSense for Alpine.js

IntelliSense for Alpine.js Features Provides syntax highlighting for Alpine.js directives along with autocomplete for all base directives and modifier

Nov 17, 2022

E-commerce website using Laravel, Tailwindcss and Alpine.js

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Dec 12, 2022

Multi-step wizard helpers for Alpine.js

Multi-step wizard helpers for Alpine.js

Alpine Wizard This package provides an Alpine directive (x-wizard) and a magic helper ($wizard) that allow you to quickly build multi-step wizards usi

Dec 23, 2022

📦 Alpine JS plugin to extend the functionality of the official $persist plugin

Alpine JS Persist Extended Alpine JS magic method $storage extends the official $persist plugin to help you work with local storage 📦 Example 👀 div

Dec 28, 2022

Alpine.js Language Features (Volar) extension for coc.nvim

[Experimental] coc-volar-alpinejs fork from vscode-alpine-language-features Alpine Language Features extension for coc.nvim Note @volar/alpine-languag

Oct 12, 2022

Little Alpine.js plugin to add a typewriter effect to any HTML element.

Little Alpine.js plugin to add a typewriter effect to any HTML element.

⌨️ Alpine Typewriter ⌨️ An Alpine.js plugin to add a typewriter effect to any HTML element. 🚀 Installation CDN Include the following script tag in

Dec 28, 2022

Straightforward interactive HTTP requests from within your Alpine.JS markup

Alpine Fetch Straightforward interactive HTTP requests from within your Alpine.JS markup. View the live demo here What does this do? Alpine.JS is a ru

Dec 21, 2022

Easy to use and flexible router for Alpine.js

alpinejs-router Easy to use and flexible router for Alpine.js Installation npm npm install @shaun/alpinejs-router yarn yarn add @shaun/alpinejs-router

Dec 30, 2022

Animate on scroll library

❗ ❗ ❗ This is README for aos@next ❗ ❗ ❗ For last stable release (v2) go here 🚀 Demo 🌟 Codepen Examples Different built-in animations With anchor set

Jan 2, 2023
Releases(1.1.0)
  • 1.1.0(Oct 5, 2022)

    What's Changed

    • ✨ Add animation toggle by @marcreichel in https://github.com/marcreichel/alpine-auto-animate/pull/1

    New Contributors

    • @marcreichel made their first contribution in https://github.com/marcreichel/alpine-auto-animate/pull/1

    Full Changelog: https://github.com/marcreichel/alpine-auto-animate/compare/0.1.0...1.1.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Sep 19, 2022)

  • 0.1.0(Sep 18, 2022)

Owner
Marc Reichel
Hi! 👋🏼 My name is Marc. I love to code and make the web look beautiful wherever I can.
Marc Reichel
Animate your Alpine components.

Animate your Alpine components ?? This package provides you with a simple helper to animate your ALpine.js components. Installation The recommended wa

Ralph J. Smit 18 Nov 16, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Add focal point alignment of images to your Alpine 3.x components with a custom directive.

Alpine Focal Add focal point alignment of images to your Alpine 3.x components with a custom directive. This package only supports Alpine v3.x. About

Michael Lefrancois 2 Oct 12, 2021
⏱ Simple Alpine.js plugin to display the human-readable distance between a date and now.

⏱ Alpine TimeAgo ⏱ An Alpine.js plugin to return the distance between a given date and now in words (like "3 months ago", "about 2 hours ago" or "in a

Marc Reichel 47 Dec 22, 2022
Adds a handy $parent magic property to your Alpine components.

✨ Help support the maintenance of this package by sponsoring me. Alpine $parent Access parent components using a handy $parent magic variable. This pa

Ryan Chandler 10 Aug 29, 2022
A clean integration between Cleave.js and Alpine. ✨

✨ Help support the maintenance of this package by sponsoring me. Alpine Mask This packages provide a custom x-mask directive and $mask magic variable,

Ryan Chandler 48 Dec 26, 2022
↕️ A little Alpine.js plugin to automatically resize a textarea to fit its content.

↕️ Alpine Autosize ↕️ A little Alpine.js plugin to automatically resize a textarea to fit its content. ?? Installation CDN Include the following <scri

Marc Reichel 42 Nov 5, 2022
A simple library for handling keyboard shortcuts with Alpine.js.

✨ Help support the maintenance of this package by sponsoring me. Alpine.js Mousetrap A simple library for handling keyboard shortcuts with Alpine.js.

Dan Harrin 102 Nov 14, 2022