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

unocss-preset-motion

v0.1.1

Published

UnoCSS preset for View Transitions and Scroll-Driven Animations

Readme

unocss-preset-motion

npm version npm downloads license

UnoCSS preset for modern CSS motion APIs — View Transitions and Scroll-Driven Animations, in a single tree-shakeable package.

📖 Documentation & live demos →

Install

pnpm add -D unocss-preset-motion
# or
npm i -D unocss-preset-motion
# or
yarn add -D unocss-preset-motion

Quick start

// uno.config.ts
import { defineConfig, presetWind3 } from 'unocss'
import presetMotion from 'unocss-preset-motion'

export default defineConfig({
  presets: [
    presetWind3(), // or presetWind4()
    presetMotion(),
  ],
})
<h1 class="vt-name-[page-title]">Welcome</h1>

<div class="opacity-0 translate-y-8 animate-fade-up timeline-view anim-range-entry">
  Fades in as it enters the viewport.
</div>

<div
  class="fixed top-0 left-0 h-1 w-full bg-blue-500 origin-left scale-x-0
         animate-grow-x timeline-scroll anim-range-cover"
/>

<div class="vt-old-[page-title]:animate-slide-out-left
            vt-new-[page-title]:animate-slide-in-right" />

Utilities

View Transitions

| Class | CSS | |---|---| | vt-name-<ident> | view-transition-name: <ident> | | vt-name-[<value>] | view-transition-name: <value> | | vt-name-none / vt-name-auto | corresponding keyword | | vt-class-<ident> | view-transition-class: <ident> | | vt-class-[card_featured] | view-transition-class: card featured |

Scroll-Driven Animations — animation-timeline

| Class | CSS | |---|---| | timeline-view | animation-timeline: view() | | timeline-scroll | animation-timeline: scroll() | | timeline-scroll-x / -y / -root / -self / -nearest | corresponding scroll(<scroller>) | | timeline-<name> | animation-timeline: --<name> | | timeline-[<value>] | arbitrary |

view-timeline-* / scroll-timeline-*

| Class | CSS | |---|---| | view-timeline-<name> | view-timeline-name: --<name> | | scroll-timeline-<name> | scroll-timeline-name: --<name> | | view-timeline-axis-x (-y, -block, -inline) | view-timeline-axis: <axis> | | scroll-timeline-axis-x (etc.) | scroll-timeline-axis: <axis> | | view-timeline-inset-[<value>] | view-timeline-inset: <value> |

animation-range

Range keywords: entry, exit, cover, contain, entry-crossing, exit-crossing.

| Class | CSS | |---|---| | anim-range-<kw> | animation-range: <kw> | | anim-range-start-<kw> | animation-range-start: <kw> | | anim-range-end-<kw> | animation-range-end: <kw> | | anim-range-[entry_0%_exit_100%] | animation-range: entry 0% exit 100% |

timeline-scope

| Class | CSS | |---|---| | timeline-scope-<name> | timeline-scope: --<name> | | timeline-scope-[<value>] | arbitrary |

Variants — ::view-transition-* pseudo-elements

| Variant | Selector | |---|---| | vt-old-[<name>]: | ::view-transition-old(<name>) | | vt-new-[<name>]: | ::view-transition-new(<name>) | | vt-group-[<name>]: | ::view-transition-group(<name>) | | vt-image-pair-[<name>]: | ::view-transition-image-pair(<name>) |

Wildcard supported: vt-group-[*]:duration-300.

Options

presetMotion({
  // Wrap view-transition utilities in
  // `@media (prefers-reduced-motion: no-preference)`.
  respectReducedMotion: false,

  // Default animation duration applied to ::view-transition-* pseudos.
  // Set to false to disable the preflight.
  defaultDuration: '300ms',

  // Prefix all utilities.
  prefix: '',
})

Theme integration

defineConfig({
  presets: [presetMotion()],
  theme: {
    motion: {
      timelines: {
        hero: 'view()',
        footer: 'scroll()',
      },
    },
  },
})

timeline-hero then resolves to animation-timeline: view().

Browser support

  • View Transitions API: supported in all evergreen browsers for same-document transitions. See caniuse.
  • Scroll-Driven Animations: Chrome 115+. Firefox and Safari behind flags as of writing. See caniuse.

Docs & playground

  • Full documentation with live demos: https://manutopik.github.io/unocss-preset-motion/

  • Run the local Vue playground:

    pnpm i
    pnpm play

Contributing

PRs welcome. Run pnpm test and pnpm lint before opening one.

License

MIT © ManUtopiK