Skip to content
Premium & Brand

Number Flow

Formatted number whose digits roll to each new value.

Import

tsx
import { NumberFlow } from "@cronus-ui/ui";
bash
npx cronus-ui add number-flow

Examples

API Reference

Generated from the component's exported types.

NumberFlowProps

Extends Omit<ComponentPropsWithoutRef<"span">, "children">

Skip NumberFlowProps props table
PropTypeDefaultDescription
ref
Ref<HTMLSpanElement>
value*
numberNumber to display. Non-finite values render as `0`.
prefix
string""Text drawn before the formatted number.
suffix
string""Text drawn after the formatted number.
format
NumberFlowFormat"number"How the number is formatted. `currency` and `decimal` default to 2 fraction digits (the currency symbol is `prefix`, not Intl). `percentage` uses `Intl` percent style (pass `0.42` for 42%).
locale
NumberFlowLocale"en-US"Locale passed to `Intl.NumberFormat`.
minimumFractionDigits
numberMinimum fraction digits. Overrides the format default when set.
maximumFractionDigits
numberMaximum fraction digits. Overrides the format default when set.
reducedMotion
"user" | "always" | "never""user"How `prefers-reduced-motion` is honoured. Defaults to `"user"` (snap). `"never"` always rolls digits — e.g. a showcase that must demonstrate it.