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

@drivexstudio/animations

v1.0.8

Published

Creative text animations and micro-interaction components for React

Readme

@drivexstudio/animations

Creative text animations and micro-interaction components for React, built on GSAP, Framer Motion, and Lenis.

Install

npm install @drivexstudio/animations

react and react-dom (>=18) are peer dependencies — install them in your app if they aren't already.

This package requires Tailwind CSS v3+ in the consuming app, plus a few design tokens that are NOT part of Tailwind's default theme. Components are styled with Tailwind utility classes rather than shipping compiled CSS, so if these tokens aren't already defined in your project, classes like bg-brand produce no CSS at all — components render unstyled with no error.

Your app must already define, under the exact names below (this package does not ship a preset or CSS file — add these to your own tailwind.config.js theme and global CSS if they don't already exist):

| Token | Type | Used for | |---|---|---| | brand | Tailwind color | bg-brand, text-brand | | background | Tailwind color | bg-background, ring-offset-background | | body-sm | Tailwind fontSize | text-body-sm | | body | Tailwind fontSize | text-body | | body-lg | Tailwind fontSize | text-body-lg | | --ease-power4-in-out | CSS custom property | inline transition-timing-function on hover/press micro-interactions |

Also make sure Tailwind's content config scans this package's compiled output, or it will purge classes it thinks are unused:

content: [
  './src/**/*.{js,jsx,ts,tsx}',
  './node_modules/@drivexstudio/animations/dist/**/*.{js,cjs}'
]

A Tailwind preset + base CSS file shipping these tokens with sensible defaults previously lived in this package and can be reintroduced later if useful across multiple consuming projects — for now this documents the requirement instead.

Setup

Some components depend on context providers being mounted above them in your app tree. Wrap your root layout once:

import {
  LenisProvider,
  PreloaderProvider,
  PageTransitionProvider,
  PageEnterProvider
} from '@drivexstudio/animations';

export default function RootLayout({ children }) {
  return (
    <LenisProvider>
      <PreloaderProvider>
        <PageTransitionProvider>
          <PageEnterProvider>
            {children}
          </PageEnterProvider>
        </PageTransitionProvider>
      </PreloaderProvider>
    </LenisProvider>
  );
}

You only need the providers for the features you actually use — e.g. skip PreloaderProvider if you don't render <Preloader />.

Usage

Scramble text on hover

import { ScrambleText } from '@drivexstudio/animations';

<ScrambleText triggerOnHover duration={0.6}>
  Hover me
</ScrambleText>

Scroll-triggered headline

import { ScrollAnimatedHeadline } from '@drivexstudio/animations';

<ScrollAnimatedHeadline
  headline={{ text: 'Built for motion', level: 'h1' }}
/>

Animated button / link

import { AnimatedButton, AnimatedLink } from '@drivexstudio/animations';

<AnimatedButton onClick={handleClick}>Get started</AnimatedButton>
<AnimatedLink href="/work">View work</AnimatedLink>

Scramble multiple elements together

import { ScrambleGroup, ScrambleText } from '@drivexstudio/animations';

<ScrambleGroup stagger={0.08}>
  <ScrambleText>First line</ScrambleText>
  <ScrambleText>Second line</ScrambleText>
</ScrambleGroup>

Components

| Export | Description | |---|---| | ScrambleText | Character-scramble reveal/hover text effect | | ScrambleGroup / useScrambleGroup | Staggers multiple ScrambleText children on scroll or manually | | AnimatedHeadline | Headline with entrance/scroll animation | | ScrollAnimatedHeadline | Scroll-triggered wrapper around AnimatedHeadline | | AnimatedButton | Button with built-in micro-interaction | | AnimatedLink | Link with built-in micro-interaction | | AnimatedProse / AnimatedProseContext / stagger | Paragraph-level staggered text reveal | | AnimatedSubtext | Subtext reveal animation | | AnimatedText | Generic staggered text animation | | Preloader | Page preloader, driven by PreloaderProvider |

Providers & hooks

| Export | Description | |---|---| | LenisProvider / useLenis / scrollToTop / getLenis / setCssScrollLocked / getCssScrollLocked | Smooth-scroll setup and helpers | | PreloaderProvider / usePreloader | Preloader phase state | | PageTransitionProvider / usePageTransitionContext / usePageTransition | Route-transition phase state | | PageEnterProvider / usePageEnterContext / usePageEnter | Coordinates staggered "page enter" animations across components | | useIdleGSAP | Runs a GSAP setup callback during browser idle time | | useAsciiDelay | Small timing utility | | useDualLayerScramble | Low-level hook behind ScrambleText's dual-layer effect |

Low-level utilities

gsap, useGSAP, ScrollTrigger, SplitText, ScrambleTextPlugin, cx, cva, and easingDefinitionToFunction are re-exported for consumers who want to build custom animations with the same GSAP plugin setup this package uses internally.

Development

npm install
npm run build   # bundles packages/index.js -> dist/ (ESM + CJS)
npm run dev      # watch mode

License

MIT