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

ui-transition-test

v0.0.299

Published

<div align="center">

Readme

UiTransition

Create dynamic CSS spring animations

Intro

UiTransition is a Vue JS component that tries to provide an easy way to use spring animations for enter and leave states of DOM nodes. Although there is an API available to get an array of spring values, this package was created to be used as a component, not a fully fledged animation library.

Quick peek

config can be customized to your taste

// basic
<UiTransition config="slideX">
    <div v-if="show" />
</UiTransition>

// with arguments
<UiTransition config="slideX(0, 100)">
    <div v-if="show" />
</UiTransition>

// different entrance and exit animations
<UiTransition
  :config="{
    enter: 'slideX',
    leave: 'fade(0, 0.75)',
  }"
>
    <div v-if="show" />
</UiTransition>

Get started

$ npm i ui-transition
// import App, and createApp

import UiTransition from "ui-transition";

const app = createApp(App);

// basic
app.use(UiTransition);

// with your configurations
app.use(UiTransition, {
  // set default values,
  // build animations,
  // set spring presets,
  // or leave it blank...
  // spring presets, and animations
  // can be created on the fly.
});

The why...

I'm a big fan of smooth transitioning with a natural feel for DOM nodes. This library was created to simplify that process of using a spring animation that will run at ~60FPS. Even on low power mode. To be honest, raf won't achive that kind of performance, even when animating composite properties (transform, opacity). If you need to make a bulky request, be ready for some janky animations. This is where <UiTransition /> comes in 👨‍🏫. <UiTransition /> uses the WAAPI if it is available, and falls back to using CSS Keyframes. Keyframes uses off main thread animation so you can be sure to do CPU draining tasks with your DOM node on the main thread, without having it interupted with calculations on every frame to create spring animations, ensuring a butter smooth animation with a natural feel.

Props

config

This is where all the magic happens. A dynamic prop that accepts different types. If false is passed here, no animation will be used.

propType

string | boolean | BuildAnim

Custom types assosiated with the config prop. The BuildAnim type above is explained below.

// This is the BuildAnim type
interface BuildAnim extends Anim {
  enter?: Anim;
  leave?: Anim;
}

interface Anim {
  frame: Frame;
  extends?: string;
  duration?: DurationAndDelay;
  delay?: DurationAndDelay;
  ease?: Ease;
  spring?: Spring;
}

type Frame = (step: Step, phase: AnimPhase) => DynamicObject<string | number>;

type Step = (
  from: number | number[],
  to: number | number[]
) => number | number[];

type AnimPhase = "enter" | "leave";

interface DynamicObject<T> {
  [key: string]: T;
}

type DurationAndDelay = number | AnimPhaseObject<number> | undefined;

type AnimPhaseObject<T> = {
  [key in AnimPhase]?: T;
};

type Ease = string | AnimPhaseObject<string>;

type Spring = string | AnimPhaseObject<SpringRoot>;

type SpringRoot = string | SpringObject;

type SpringObject = {
  tension?: number;
  friction?: number;
  mass?: number;
  precision?: number;
  velocity?: number;
  stopAttempt?: number;
};