A number whose digits roll to a new value, as an odometer, for a total or a count that changes.
import { RollingNumber } from "@plexui/react-native"
| iOS 26 | Android |
|---|
| Native component | None: the Plex rolling number (SwiftUI's numeric text transition is a modifier of its own) | None: the Plex rolling number |
| Look | Each changed digit rolls on its reel | Each changed character fades and slides to the new one |
| Prop | Type | Default | Description |
|---|
value | number | — | The number shown; a new value rolls each changed digit to it |
locales | Intl.LocalesArgument | "en-US" | The locale the number is written in. Its own digits roll, such as Arabic-Indic |
format | Intl.NumberFormatOptions | — | How it is written: a currency, a percent, fraction digits, grouping |
size, weight, color, variant… | TextProps | — | The props of Text, for the type and color; the figures are tabular |
style | StyleProp<TextStyle> | — | Style of the characters, such as a font size |
containerStyle | StyleProp<ViewStyle> | — | Style of the row of characters |
duration | number | 600 on iOS, 320 on Android | How long a change takes, in ms |
animation | "roll" | "count" | "roll" | roll turns each changed digit; count counts the whole number to the new value |
from | number | value | count: the number it counts up from when it first shows |
delay | number | 0 | count: how long it waits before counting, in ms |
easing | (t: number) => number | --rolling-number-ease on iOS, ease-out quint on Android | count: the curve of the count |
onCountEnd | () => void | — | count: called when the count reaches its value (at once with reduced motion) |
testID | string | — | Test id |