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

@toffee.studio/ai-interaction-design

v0.2.1

Published

AI interaction design components for React and Next.js — shimmer text, streaming text, generative image blur, pixel reconstruction effects, and more by Toffee Studio.

Readme

@toffee.studio/ai-interaction-design

AI interaction design components for React and Next.js by Toffee Studio.

Shimmer text, token-streaming, generative image reveals — all with a unified API and first-class Next.js App Router support.


Install

npm install @toffee.studio/ai-interaction-design @emotion/react

Quick Start

1. Wrap with ToffeeProvider (Next.js App Router)

// app/layout.tsx
'use client'
import { ToffeeProvider } from '@toffee.studio/ai-interaction-design'

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <ToffeeProvider>{children}</ToffeeProvider>
      </body>
    </html>
  )
}

2. Use a component

'use client'
import { ShimmerText } from '@toffee.studio/ai-interaction-design/client'

export function LoadingLabel() {
  return (
    <ShimmerText speed="slow" tone="brand" variant="strong">
      Generating response...
    </ShimmerText>
  )
}

Note: All animated components must be used inside a Client Component ('use client'). Import them from @toffee-studio/ai-interaction-design/client.


Components

ShimmerText

A moving gradient shimmer over text — ideal for "AI thinking" labels, loading placeholders, or generative content previews.

<ShimmerText
  variant="strong"
  speed="slow"
  tone="brand"
  direction="ltr"
  shimmerWidth="wide"
  repeat="loop"
>
  Generating response...
</ShimmerText>

| Prop | Type | Default | Description | |------|------|---------|-------------| | children | ReactNode | — | Text content | | variant | 'default' \| 'soft' \| 'strong' | 'default' | Visual intensity | | speed | 'slow' \| 'normal' \| 'fast' \| number | 'normal' | Animation speed | | tone | 'neutral' \| 'brand' \| 'muted' | 'brand' | Color palette | | direction | 'ltr' \| 'rtl' \| 'diagonal' | 'ltr' | Shimmer sweep direction | | shimmerWidth | 'narrow' \| 'normal' \| 'wide' | 'normal' | Width of the light band | | repeat | 'loop' \| 'once' \| 'hover' | 'loop' | When the shimmer plays | | delay | number | 0 | Delay in ms before animation starts | | shimmerColor | string | — | Custom shimmer highlight color | | reducedMotion | boolean \| 'auto' | 'auto' | Motion override | | as | React.ElementType | 'span' | Polymorphic root element | | slots | SlotProps | — | before, after, overlay render slots |

StreamingText

Token-by-token text reveal — mimics ChatGPT / Claude streaming.

<StreamingText
  text="The quick brown fox jumps over the lazy dog."
  speed="fast"
  tone="brand"
  showCaret
/>

GenerativeImage

Blur-to-sharp reveal — mimics Midjourney / DALL-E image generation.

<GenerativeImage
  src="/ai-output.jpg"
  alt="AI generated landscape"
  width={512}
  height={512}
  speed="slow"
  tone="brand"
/>

Shared Props

All components share these base props:

| Prop | Type | Default | Description | |------|------|---------|-------------| | variant | 'default' \| 'soft' \| 'strong' | 'default' | Visual style | | speed | 'slow' \| 'normal' \| 'fast' \| number | 'normal' | Duration | | tone | 'neutral' \| 'brand' \| 'muted' | 'neutral' | Color theme | | reducedMotion | boolean \| 'auto' | 'auto' | OS preference | | className | string | — | CSS class | | style | CSSProperties | — | Inline styles | | as | React.ElementType | varies | Polymorphic root |


Theming

Override CSS variables globally via ToffeeProvider:

<ToffeeProvider
  theme={{
    tones: {
      brand: {
        '--toffee-shimmer-mid': 'rgba(234, 179, 8, 0.7)',
        '--toffee-text-color': 'rgba(234, 179, 8, 0.9)',
      },
    },
  }}
>
  {children}
</ToffeeProvider>

Headless Hooks

import { useStreamingText } from '@toffee-studio/ai-interaction-design/client'

const { displayedText, done, pause, reset } = useStreamingText({
  text: responseText,
  tickMs: 20,
})

Entry Points

| Import | Contents | |--------|----------| | @toffee.studio/ai-interaction-design | ToffeeProvider, types, tokens (server-safe) | | @toffee.studio/ai-interaction-design/client | ShimmerText, StreamingText, GenerativeImage, hooks (client-only) |


License

MIT © Toffee Studio