Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-number-roll.json --yes

Number roll

Pro

Rolling text: a number or words that spin into their new value, for React and Tailwind CSS. Part of Goop Pro.

Change the value up or down (digits count that way) or to words (letters run forward); switch the type size, the end the reels match from, the turns, the unit and the words beside. The values are ours; under reduced motion the new value stands at once.

When to use

  • Rolling text: a number or words that spin into their new value.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Number roll on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-number-roll.json --yes
PROMPT
Add the Goop Number roll to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { NumberRoll, NumberRollLabel } from '@/components/ui/goop/number-roll';

function DailyAverage({ ms }: { ms: number }) {
  return (
    <div className="flex flex-col items-start gap-0.5">
      <NumberRollLabel className="text-base font-medium text-muted-foreground">Daily average</NumberRollLabel>
      <NumberRoll value={ms} format={(n) => n.toLocaleString()} unit="ms" size="4xl" />
      <p className="text-sm text-muted-foreground">
        Status: <NumberRoll value="Shipped" size="inherit" announce />
      </p>
    </div>
  );
}
  • Fits: overview: body.
  • Also known as: AnimatedNumber.
  • width, gap, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
sizesm | base | xl | 4xl | inherit = base
valuenumber | stringThe value shown: a number, or words.
format?(value: number) => stringHow a number reads: grouped digits in the document's language by default.
unit?stringThe words set small after the value ("ms", "notes").
duration?numberEach reel's run in milliseconds; the theme's roll duration by default.
stagger?numberThe milliseconds between one reel's start and landing and the next's; the theme's stagger by default.
spins?number = 1Whole extra turns a reel makes before it lands: 1 by default; 0 rolls straight to the new character.
align?'auto' | 'start' | 'end' = 'auto'The edge characters are matched from: auto (the default) matches a number from its end (its units stay its units) and words from their start; start or end matches either from that edge.
announce?boolean = falseSays each new value in a polite live region: for a value that changes without the reader's doing.
Parts
PartWhat it is
NumberRollLabelThe words beside a rolling number (its label, its sub-line); children: string — The words; a change crossfades to the new ones
  • Class recipes (cva): numberRollVariants (NumberRoll)
  • data-slot values (to select a part by): number-roll, number-roll-label, number-roll-reel, number-roll-unit, number-roll-value

Motion

  • The part sets its own motion: add no transition or animation of your own.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/meadow/components/number-roll.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-number-roll.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.