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

oands-animation

v1.0.1

Published

**oands** is a simple and flexible animation package that allows developers to easily apply animations to HTML elements based on their class names. With a wide range of predefined animations, you can bring your UI to life with minimal effort.

Downloads

3

Readme

oands Animation Package

oands is a simple and flexible animation package that allows developers to easily apply animations to HTML elements based on their class names. With a wide range of predefined animations, you can bring your UI to life with minimal effort.

Features

  • Apply animations by simply adding class names to your elements.
  • Support for various types of animations including fades, slides, bounces, rotations, shakes, and more.
  • Customizable animation durations.
  • Easy-to-use class-based animation system.

Installation

To install the oands package, run:

bash

Copy code

npm install oands-animations

Usage

  1. Import the animations into your project:

    In your JavaScript file, you need to import the animations you want to use:

    javascript

    Copy code

    import { fadein, fadeout } from 'oands-animations/src/fade.js'; import { slidein, slideout } from 'oands-animations/src/slide.js'; // Add more animations as needed

  2. Adding Animations to HTML Elements:

    To apply an animation to an HTML element, simply add a class name following the format: oands_animationName_duration. For example:

    html

    Copy code

    ` This element will fade in over 2 seconds.

  3. Animation Class Name Format:

    • Prefix: oands_ (required)
    • Animation Name: Name of the animation (e.g., fadein, slidein, bounceinright).
    • Duration: Optional duration in milliseconds (default is 1000ms).

    Example class names:

    • oands_fadein_1000: Fades in the element over 1 second.
    • oands_slidein_500: Slides the element in over 0.5 seconds.
  4. Supported Animations:

    Here is a list of the animations you can use:

    • Fade Animations:
      • fadein
      • fadeout
    • Slide Animations:
      • slidein
      • slideout
    • Bounce Animations:
      • bounceinright
      • bounceintop
      • bounceinleft
      • bounceinbottom
    • Scale Animations:
      • scalein
      • scaleout
      • scaleininfinite
      • scaleoutinfinite
    • Rotate Animations:
      • rotateright
      • rotateleft
      • rotatex0to360
      • rotatex360to0
      • rotateyinfinity
      • rotatexinfinity
    • Flip Animations:
      • flip
      • flipvertical
    • Shake Animations:
      • shakevertical
      • shakehorizontal
      • shakewobble
    • Other Animations:
      • swing
      • pulse
      • rubberband
      • fancyslide
      • fancyslidereverse
      • jelloanimation
      • wobble
      • rollinanimation
      • rolloutanimation
      • blindsupanimation
      • blindsdownanimation

    For a complete list, refer to the code or documentation.

  5. Handling Multiple Animations:

    If you want to apply multiple animations to the same element, add multiple class names:

    html

    Copy code

    ` This element will fade in and slide in at the same time.

  6. Customizing Duration:

    You can customize the duration of each animation by specifying it as part of the class name. The duration should be in milliseconds:

    html

    Copy code

    ` This element will fade in over 3 seconds.

Example

html

Copy code

`

<div class="oands_slidein_2000">
    This will slide in over 2 seconds.
</div>

<div class="oands_bounceinright_1500">
    This will bounce in from the right over 1.5 seconds.
</div>

<script src="animations.js"></script>

Contributing

Contributions are welcome! If you want to contribute or report a bug, feel free to open an issue or submit a pull request.

License

This package is open source under the MIT License.


Feel free to customize the README according to your preferences or add any additional sections that might be relevant (e.g., advanced usage, troubleshooting).