npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

simple-css-animation-package

v1.0.12

Published

This is a very simple package for those who want to have CSS animations included in their next project no matter which framework with no underneath dependencies

Downloads

17

Readme

Simple CSS Animation Package

An extremely simple css animation package which can be used cross-framework without any additional dependencies underneath. The goal was to make it possible to have cleaner animations with the help of JSON objects on different events.

Example:

import SimpleCSSAnimationPackage from "simple-css-animation-package";

SimpleCSSAnimationPackage(
  [
    {
      _simpleAnimationSequenceWaiting: 0, // delay before starting the entire sequence
      _simpleAnimationWaitPerElement: 0, // delay for individual element if multiple with same attributes are found
      _simpleAnimationDuration: 500, // animation duration of all elements
      _simpleAnimationIncrease: 10, // per element delay difference (like starting a bit later)
      opacity: "0",
      transform: "Translate(2em,0)",
    },
    {
      _simpleAnimationSequenceWaiting: 1000,
      _simpleAnimationDuration: 1000,
      _simpleAnimationIncrease: 100,
      opacity: "1",
      transform: "Translate(0,0)",
    },
  ],
  `title`
);

Please checkout the example on Codepen: https://codepen.io/mehdiroshanfekr/pen/GRxzbgJ

Documentation

The function accepts 2 variables:

JSON Array: I can be any css variables as shown in the example and the 4 additional variables called mentioned above

Element Attribute: So that the function knows which element to target, it requires a custom tag called simple-ca like the example below:

<div class="sample-app" simple-ca="title">Somthing</div>

CDN

<script src="https://unpkg.com/simple-css-animation-package"></script>

Or you can use a custom version and replace 1.0.5 with whichever version you desire

<script src="https://unpkg.com/[email protected]"></script>

Version Notes

1.0.12 - Type support added

1.0.8 - The inline styles can be flushed with a secondary function now called SimpleCSSFlushInlineCSS

1.0.5 - The older version which were working with the id will no longer work and there are new variables available which can improve your process of using it a lot