API and Development
AnimatedNumber is exported from @prepared911/ui-core. The NumberFlow adapter stays package-private behind a lazy boundary. Suspense and a local chunk error boundary ensure federation or network failures degrade to static formatting.
Name | Type | Default | Description |
|---|---|---|---|
|
| — | Target numeric value to display and animate toward. |
|
| — | — |
|
|
| Animation duration in milliseconds. |
|
| — | Intl options forwarded to localized |
|
| — | Optional entrance start value. Omission snaps first paint to |
|
| — | — |
|
|
| When true, renders text with medium font weight. |
|
|
| When true, renders text with bold font weight. |
|
| — | Typography variant. Defaults to {@link TextType.NumericDisplay}. |
Interactive examples and edge cases for this component are in Storybook.
Requires a localized announcement. Initial paint stays silent; announcements fire on NumberFlow animation finish.
Defaults to NumericDisplay. Other animated text types share the same NumberFlow runtime.
Import AnimatedNumber from the package root. Do not deep-import the adapter module. Static SSR and Suspense fallback paint use StaticCoreText with asSpan.
| Export | Notes |
|---|---|
AnimatedNumberLive | Off (default) or Polite. |
usePrefersReducedMotion | Public hook backed by the private ref-counted broker. |