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

zotion

v1.1.5

Published

**Zotion**

Downloads

3

Readme

Zotion

Zotion is a library of reusable animations for web interfaces, built on top of Framer Motion. It provides a set of React components that you can use to create smooth and dynamic transitions between elements on your website. Zotion includes animations for text, images, buttons, and other commonly used components, as well as more complex interactions using container and staggered animations.

Installation You can install Zotion in your React app using the following command:

npm install zotion

Usage

To use Zotion components in your React app, first import them from the zotion package:

import { FadeIn, SlideIn, TextVariant } from "zotion" 

Then, use them in your components like any other React component:

export const MyComponent = () => {
  return (
    <div>
      <TextVariant delay={0.5}>
        <h1>Welcome to my website!</h1>
      </TextVariant>
      <FadeIn direction="up" duration={0.5} delay={0.75}>
        <p>This is an example of using Zotion to create smooth animations.</p>
      </FadeIn>
      <SlideIn direction="left" type="easeOut" delay={1} duration={0.5}>
        <button>Click Me!</button>
      </SlideIn>
    </div>
  )
}

Available Components

Zotion includes the following components:

TextVariant

A component that applies a spring animation to text elements, making them slide up and fade in from a hidden state. You can customize the delay for the animation by passing in a delay prop.

<TextVariant delay={0.5}>
  <h1>Welcome to my website!</h1>
</TextVariant>

FadeIn

A component that applies a fade-in animation to an element, with the option to specify the direction of the motion and the type of transition. You can customize various aspects of the animation, such as the duration, delay, and direction, by passing in props.

<FadeIn direction="up" duration={0.5} delay={0.75}>
  <p>This is an example of using Zotion to create smooth animations.</p>
</FadeIn>

ZoomIn

A component that applies a zoom-in animation to an element. You can customize the duration and delay of the animation by passing in props.

<ZoomIn delay={1} duration={1}>
  <button>Click Me!</button>
</ZoomIn>

SlideIn

A component that applies a slide-in animation to an element, with the option to specify the direction of the motion and the type of transition. You can customize various aspects of the animation, such as the duration, delay, and direction, by passing in props.

<SlideIn direction="left" type="easeInOut" delay={1.5} duration={0.5}>
  <img src="example.jpg" alt="Example" />
</SlideIn>

StaggerContainer

A component that applies staggered animations to a set of child elements. You can customize the delay between each child element by passing in a delayChildren prop, and customize the animation by passing in a staggerChildren prop to control the timing of each animation.

<StaggerContainer staggerChildren={0.25} delayChildren={0.5}>
  <FadeIn direction="right" duration={0.5}>
    <p>Here's some text.</p>
  </FadeIn>
  <FadeIn direction="right" duration={0.5} delay={0.25}>
    <p>And some more text.</p>
  </FadeIn>
  <FadeIn direction="right" duration={0.5} delay={0.5}>
    <p>And even more text!</p>
  </FadeIn>
</StaggerContainer>

What Next?

Zotion is a flexible and easy-to-use library for implementing animations in your web applications. You can customize the transition effects and timings to create interactive and engaging interfaces with minimal coding. Feel free to experiment with different combinations of animations and use cases, and see what creative solutions you can come up with!