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

vidom-css-animation-group

v0.4.0

Published

CSS animation helper for vidom

Downloads

17

Readme

vidom-css-animation-group Build Status npm version

What is it?

This module provides API for "appearance", "entering" and "leaving" animation via CSS transitions and animations inside Vidom. It's a high-level component based on low-level vidom-animation-group.

Demo

Circles

Installation

npm i vidom-css-animation-group

How to use

This module provides two components: CssTransitionGroup and CssAnimationGroup. If you animation is based on CSS transition, you should use the first one, or if you use CSS animation then use the second one.

CssTransitionGroup

CssTransitionGroup supports following pairs of attributes:

Appearing phase

CSS-classes which are set for each child after group has been mounted.

  • {String} appearFrom CSS class which describes initial state of your appearing transition
  • {String} appearTo CSS class which describes final state of your appearing transition

Entering phase

CSS-classes which are set when a new child enters to already mounted group.

  • {String} enterFrom CSS class which describes initial state of your entering transition
  • {String} enterTo CSS class which describes final state of your entering transition

Leaving phase

CSS-classes which are set when a child leaves from mounted group.

  • {String} leaveFrom CSS class which describes initial state of your leaving transition
  • {String} leaveTo CSS class which describes final state of your leaving transition

Note Any of these pairs are optional, but if you specify either CSS-class from pair, you have to specify another one. For instance, if you specify enterFrom, you must specify enterTo and vice versa.

import { Component } from 'vidom';
import { CssTransitionGroup } from 'vidom-css-animation-group';

class MyListComponent extend Component {
    onRender({ items }) {
        return (
            <CssTransitionGroup
                appearFrom="list-item_appear-from"
                appearTo="list-item_appear-to"
                enterFrom="list-item_enter-from"
                enterTo="list-item_enter-to"
                leaveFrom="list-item_leave-from"
                leaveTo="list-item_leave-to">
                { items.map(({ id, text }) => <div key={ id }>{ text }</div> }
            </CssTransitionGroup>
        );
    }
}

CssAnimationGroup

CssTransitionGroup supports following attributes:

  • {String} appear CSS class which describes appearing animation
  • {String} enter CSS class which describes entering animation
  • {String} leave CSS class which describes leaving animation
import { Component } from 'vidom';
import { CssAnimationGroup } from 'vidom-css-animation-group';

class MyListComponent extend Component {
    onRender({ items }) {
        return (
            <CssAnimationGroup
                appear="list-item_appear"
                enter="list-item_enter"
                leave="list-item_leave">
                { items.map(({ id, text }) => <div key={ id }>{ text }</div> }
            </CssAnimationGroup>
        );
    }
}