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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kcuf-ui/rc-transition

v0.0.3

Published

A transition manager for react component.

Downloads

4

Readme

@kcuf-ui/rc-transition

A ~~fork~~ rewritten of https://www.npmjs.com/package/react-transition-group using TS and hooks.

It's NOT designed to be a drop-in replacement of react-transition-group, however some APIs are learned from it.

Why

  1. react-transition-group has not been updated for over 2 years (version 4.4.5 till 2025/01/03)
  2. react-transition-group is written in JS
  3. react-transition-group depends on prop-types which TS react coders might hate
  4. react-transition-group is in class component format
  5. react-transition-group uses deprecated findDOMNode which can only be used in class component
  6. react-transition-group cannot start its own dev environment now, a bunch of errors

How to Use

Using Render Props

import Transition from '@kcuf-ui/rc-transition';

const transitionStyles = {
  entering: {
    opacity: 1
  },
  entered: {
    opacity: 1
  },
  exiting: {
    opacity: 0
  },
  exited: {
    opacity: 0
  }
};

<Transition {...props}>
  {(status: 'entering' | 'entered' | 'exiting' | 'exited') => <Child style={transitionStyles[status]} />}
</Transition>

Using data-transition

import styled from 'styled-components';

import Transition from '@kcuf-ui/rc-transition';

const ScChild = styled.div`
  &[data-transition='entering'] {
    opacity: 1;
  }
  
  &[data-transition='entered'] {
    opacity: 1;
  }
  
  &[data-transition='exiting'] {
    opacity: 0;
    text-decoration: line-through;
  }
  
  &[data-transition='exited'] {
    opacity: 0;
  }
`;

<Transition {...props}>
  <ScChild />
</Transition>

Using useTransitionStatus hook

import {
  ReactElement
} from 'react';
import styled from 'styled-components';

import Transition, {
  useTransitionStatus
} from '@kcuf-ui/rc-transition';

function Child(): ReactElement {
  const transitionStatus = useTransitionStatus(); // however you would like to use it
  
  return <div>...</div>;
}

<Transition {...props}>
  <Child />
</Transition>

APIs

Exports

  • Removed
    • CSSTransitionTransition + data-transition is enough
  • Renamed
    • SwitchTransitionTransitionSwitch TODO
    • ReplaceTransitionTransitionReplace TODO

TransitionProps

| prop | Description | | :---: | :---: | | nodeRef | Needed when mountOnEnter \|\| unmountOnExit to force reflow. | | in | Same as react-transition-grpup. | | durationEnter?: number | Default 400ms | | durationExit?: number | Default to durationEnter | | onEnter() | No parameters. | | onEntered() | No parameters. | | onExit() | No parameters. | | onExited() | No parameters. |

These props are removed:

  • ~~onEntering()~~
  • ~~onExiting()~~
  • ~~appear~~ → There is no appear now, treated the same as enter.
  • ~~enter~~ → durationEnter: 0
  • ~~exit~~ → durationExit: 0
  • ~~timeout?: number \| { apear?: number; enter?: number; exit: number; }~~ → durationEnter?: number + durationExit?: number
  • ~~addEventListener~~