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-construction-library/motion

v0.1.5

Published

Optional motion extension for @ui-construction-library — FadeIn, SlideIn, Bounce and animated wrappers.

Readme

@ui-construction-library/motion

Motion extension for the UI Construction Library. Provides animation-enhanced components and wrappers that can be composed with @ui-construction-library/core.

When to use

Use this package when you want animated transitions — fade-ins, slide-ins, bounces, or custom motion wrappers. It is an optional extension; core works without it.

Installation

pnpm add @ui-construction-library/motion

Peer dependencies

{
  "react": ">=18.0.0",
  "react-dom": ">=18.0.0"
}

Minimal example

import { FadeIn, SlideIn, Bounce } from '@ui-construction-library/motion';

// Fade in any content
<FadeIn>
  <h1>Welcome</h1>
</FadeIn>

// Slide in from a direction
<SlideIn direction="right">
  <nav>Sidebar</nav>
</SlideIn>

// Bounce entrance
<Bounce>
  <div className="notification">New message</div>
</Bounce>

Available components

| Export | Description | |---|---| | FadeIn | Wraps children with a CSS fade-in entrance animation | | SlideIn | Wraps children with a directional slide-in animation | | Bounce | Wraps children with a bounce entrance animation | | MotionDiv | Low-level animated <div> with MotionProps | | motion | Object with motion.div for building custom animated elements | | MotionFadeIn | Pre-configured motion.div with fade-in defaults | | MotionSlideIn | Pre-configured motion.div with slide-in defaults | | fadeInProps | Reusable animation prop object for fade-in | | getSlideInProps(direction) | Returns animation props for a given slide direction |

Types

import type {
  FadeInProps,
  BounceProps,
  MotionProps,
  MotionTransition,
} from '@ui-construction-library/motion';

Integration with core

Motion components wrap core components — they do not replace them:

import { Card, Heading } from '@ui-construction-library/core';
import { FadeIn } from '@ui-construction-library/motion';

<FadeIn>
  <Card className="p-6">
    <Heading as="h2">Animated card</Heading>
  </Card>
</FadeIn>

Low-level usage

import { motion, MotionDiv } from '@ui-construction-library/motion';

// motion.div — custom animated element
const AnimatedPanel = motion.div;

<AnimatedPanel
  initial={{ opacity: 0, y: 8 }}
  animate={{ opacity: 1, y: 0 }}
  transition={{ duration: 200 }}
>
  Panel content
</AnimatedPanel>

// MotionDiv — typed wrapper
<MotionDiv duration={300} easing="ease-out">
  Content
</MotionDiv>

Compatibility

  • React 18 and 19
  • No dependency on @ui-construction-library/core at runtime
  • No CSS side effects — animations are CSS-based

Public API

import {
  FadeIn, FadeInProps,
  SlideIn,
  Bounce, BounceProps,
  MotionDiv, MotionProps, MotionTransition,
  motion,
  MotionFadeIn, fadeInProps,
  MotionSlideIn, getSlideInProps,
} from '@ui-construction-library/motion';

Troubleshooting

Animation not running — confirm the component is mounted in the DOM. Animations trigger on mount; if the element is conditionally rendered, the animation fires each time it mounts.

prefers-reduced-motion — wrap animation durations with a check if you need to respect the user's OS motion preference:

const duration = window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 0 : 300;