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

autoregressive-text

v0.1.2

Published

A self-contained React animation that generates text token-by-token like an autoregressive language model — candidate sampling, attention brackets, and a subtle reveal. Zero-config, themeable via CSS variables.

Readme

autoregressive-text

A self-contained React animation that generates text token-by-token like an autoregressive language model — a candidate-sampling "thinking" panel, attention-span brackets between words, a subtle per-letter reveal, and a blinking caret.

  • Zero-config — no Tailwind, no CSS import. Drop it in and it works.
  • Themeable — light/dark by default (follows the OS), fully overridable via CSS variables.
  • Accessible — respects prefers-reduced-motion.
  • RSC-ready — ships the "use client" directive; works in the Next.js app router.

Install

npm i autoregressive-text

react, react-dom, and framer-motion are peer dependencies.

Usage

import { AutoregressiveText } from "autoregressive-text";

export default function Demo() {
  return (
    <AutoregressiveText
      text="Autoregressive models predict the next token by feeding previous predictions back into the context."
      pool={["causal", "decoder", "probability", "sequence", "attention", "weights"]}
    />
  );
}

That's it — no stylesheet import required.

Props

| Prop | Type | Default | Description | | -------------------- | ----------------------------------- | ---------- | ------------------------------------------------------- | | text | string | — | The sentence to generate, token by token. Required. | | pool | string[] | built-in | Candidate words shown in the "thinking" panel. | | speed | number | 3 | Playback rate multiplier (higher = faster). | | fontSize | number | 24 | Font size of the generated sentence, in px. | | wordSpacing | number | 0.36 | Horizontal space between words, in em. | | poolSize | number | 6 | How many candidates to surface per token. | | shimmer | string | "bay" | GradientShimmer preset for highlighted words. | | align | "left" \| "center" \| "right" | "center" | Text alignment of the generated sentence. | | showAttentionLines | boolean | true | Draw the attention-span brackets between words. | | paused | boolean | false | Pause playback. | | loop | boolean | false | Restart the animation once it completes. | | theme | "light" \| "dark" \| "system" | "system" | Color theme. "system" follows the OS preference. | | panelScale | number | 1 | Scale multiplier for the floating "thinking" panel. | | className | string | — | Extra class on the root element (for layout). | | onComplete | () => void | — | Fires once the full sentence has been generated. |

Theming

Colors are driven by namespaced CSS custom properties on the .art-root element. Override any of them from your own CSS:

.art-root {
  --art-ink: #111;          /* main text */
  --art-green: #2ecc71;     /* highlight / selected */
  --art-weight-gray: #b4b4b4;
  --art-label-gray: #9aa0a6;
  --art-bracket: #c8cacd;   /* attention brackets */
  --art-panel-bg: #ffffff;  /* thinking panel */
  --art-muted: #6b7280;
  --art-border: rgba(0, 0, 0, 0.1);
}

Sensible light and dark defaults ship built-in. Force one with theme="light" / theme="dark", or leave it on "system" to follow prefers-color-scheme.

License

MIT