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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@unis/transition

v0.1.0

Published

Unis transition component

Readme

Unis Transition

Transition component for unis inspired by React Transition Group.

Install

npm i @unis/transition

Usage

import { useState } from '@unis/unis';
import { CSSTransition, TransitionGroup } from '@unis/transition'

const App = () => {
  let [visible, setVisible] = useState(false);

  const handleToggle = () => {
    setVisible(!visible);
  }

  return () => (
    <Fragment>
      <button onClick={handleToggle}>toggle</button>
      <CSSTransition in={visible} timeout={400} classNames="fade">
        <div>
          hello
        </div>
      </CSSTransition>
    </Fragment>
  )
}
.fade-appear {
  opacity: 0;
}

.fade-appear-active {
  opacity: 1;
  transition: all 0.4s ease;
}

.fade-appear-done {
  opacity: 1;
}

.fade-enter {
  opacity: 0;
}

.fade-enter-active {
  opacity: 1;
  transition: all 0.4s ease;
}

.fade-enter-done {
  opacity: 1;
}

.fade-exit {
  opacity: 1;
}

.fade-exit-active {
  opacity: 0;
  transition: all 0.4s ease;
}

.fade-exit-done {
  opacity: 0;
}

Online demo here

CSSTransition

Component API as close to React Transition Group as possible.

in

Show the component.

type: boolean default: false

mountOnEnter

By default the child component is mounted on the first in={true}. you can set mountOnEnter={false} child component will be mounted immediately with parent component.

type: boolean default: true

unmountOnExit

By default the child component is unmounted after it finishes exiting. you can set unmountOnExit={false} child component stays mounted after it reaches the 'exited' state.

type: boolean default: true

classNames

type:

string | {
  appear?: string,
  appearActive?: string,
  appearDone?: string,
  enter?: string,
  enterActive?: string,
  enterDone?: string,
  exit?: string,
  exitActive?: string,
  exitDone?: string,
}

default: ''

for example classNames="fade" it will apply classes below

  • fade-appear, fade-appear-active, fade-appear-done
  • fade-enter, fade-enter-active, fade-enter-done
  • fade-exit, fade-exit-active, fade-exit-done

onEnter

Callback fired immediately after the 'enter' or 'appear' class is applied.

type: Function(node: HtmlElement)

onEntering

Callback fired immediately after the 'enter-active' or 'appear-active' class is applied.

type: Function(node: HtmlElement)

onEntered

Callback fired immediately after the 'enter' or 'appear' classes are removed and the done class is added to the DOM node.

type: Function(node: HtmlElement)

onExit

Callback fired immediately after the 'exit' class is applied.

type: Function(node: HtmlElement)

onExiting

Callback fired immediately after the 'exit-active' is applied.

type: Function(node: HtmlElement)

onExited

Callback fired immediately after the 'exit' classes are removed and the exit-done class is added to the DOM node.

type: Function(node?: HtmlElement)

TransitionGroup

Easy to use, just wrap on CSSTransition with key.

<TransitionGroup>
  {list.map((item, index) => (
    <CSSTransition key={item.id} timeout={400} classNames="fade">
      <div>{item.name}</div>
    </CSSTransition>
  ))}
</TransitionGroup>