Coder Social home page Coder Social logo

david-carty / animations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shoelace-style/animations

0.0 1.0 0.0 12 KB

Your favorite animate.css effects available as ES modules for use with the Web Animations API.

License: MIT License

JavaScript 100.00%

animations's Introduction

Shoelace Animations

Your favorite animate.css effects available as ES modules for use with the Web Animations API.

  • ๐Ÿ† ~100 quality animations
  • ๐ŸŽพ ~30 popular easings
  • ๐Ÿšš Works with CDNs
  • ๐ŸŒฒ Fully tree-shakeable

Try it on JSFiddle

This module was built for Shoelace, but it works well as a stand-alone library too!

Installation

npm install @shoelace-style/animations

Usage

Importing all animations:

import * as animations from '@shoelace-style/animations';

Importing individual animations:

import { bounce } from '@shoelace-style/animations';

Importing easings:

import { easings } from '@shoelace-style/animations';

Animating an element:

<div style="display: block; width: 100px; height: 100px; background: tomato; margin: 2rem;"></div>

<script type="module">
  import { easings, flip } from 'https://cdn.jsdelivr.net/npm/@shoelace-style/animations@1/dist/index.js';

  const box = document.querySelector('div');

  box.animate(flip, {
    duration: 1500,
    iterations: Infinity,
    easing: easings.easeInSine
  });
</script>

This example uses the jsDelivr CDN. To import the library locally, install it and make node_modules/@shoelace-style/animations/dist available to your app or bundler.

Developers

This script parses all animation stylesheets found in node_modules/animate.css and generates keyframe objects that you can use with the Web Animations API. As animations are tweaked and added to animate.css, the keyframes herein will be kept in sync when rerunning the script.

To build the project, run:

npm run build

This will purge and rebuild the dist directory.

Please report all bugs and suggestions to the issue tracker.

animations's People

Contributors

claviska avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.