Measured entry

motion-primitives-sliding-number

text-effectdark-futuristicmotion on file

A client-side React number display that rolls each digit with spring motion as the value changes. It ships as a single TSX registry component, uses Tailwind utility classes for layout, and depends on Motion plus react-use-measure to animate and size each digit.

Specimen
Motion capture of the mounted demo, recorded by the harness. No audio track.
Harness screenshot of motion-primitives-sliding-number at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of motion-primitives-sliding-number at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of motion-primitives-sliding-number at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for motion-primitives-sliding-number
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal63.3 KB (128.8 KB build, 65.5 KB baseline)
Bare modeOK
Provider requiredNO
Demo usedwritten from the component source API

Verdict

A focused, dependable rolling counter that builds and mounts cleanly without a provider or shadcn-specific foundation. It is a good fit for concise numeric readouts, but localization, reduced-motion behavior, and announcement semantics remain the integrating team's responsibility.

Use it if

  • You need changing dashboard totals, counters, or scores to transition digit by digit.
  • Your React interface already uses Tailwind and can accept Motion and react-use-measure.
  • You want support for negative values, decimal values, optional leading padding, or a custom decimal separator.

Skip it if

  • You only show static values and do not want animation dependencies for a small visual flourish.
  • You need locale-aware grouping, currency formatting, or richer numeric formatting built into the component.
  • You require built-in reduced-motion handling or explicit live-region semantics for changing values.

Install

Installation record for motion-primitives-sliding-number
Declared dependenciesmotion, react-use-measure
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno provider required in the harness

In a non-shadcn project, copy the client TSX component, install Motion and react-use-measure, and ensure Tailwind processes the utility classes used by the file. No registry components, theme variables, or context provider are required.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Alternatives

Other published entries for the text-effect pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.