More components in Pro
Galleries, cards and interactive pieces for pages that need more than the basics.
value | The number to show. Digits roll to every new value. | ||
locale | 'en-US' | Locale used for separators, symbols and numerals. | |
format | Intl.NumberFormatOptions | Formatting options such as currency, percent, units or compact notation. | |
decimals | Fixed number of decimal places. Leave it out to use the format defaults. | ||
minDigits | Pads the whole part with leading zeros. | ||
prefix | ReactNode | Content shown before the number. | |
suffix | ReactNode | Content shown after the number. | |
direction | 'auto' | 'up' | 'down' | 'shortest' | 'auto' | Which way digits roll. Auto rolls up as the number grows and down as it shrinks. |
duration | 0.7 | Roughly how long a roll takes, in seconds. | |
bounce | 0.2 | How much digits overshoot before settling, from 0 to 0.9. | |
stagger | 0.04 | Delay in seconds between neighbouring digits, so changes ripple from the right. | |
motionBlur | Blurs digits along their path while they spin fast. | ||
| Spins every digit once and lands it when the counter first scrolls into view. | |||
fade | 0.3 | How far in em digits roll beyond the text before fading out. 0 clips them at the edge. | |
fontSize | number | string | 100 | Font size in px, or any CSS size such as inherit. |
fontWeight | number | string | 'inherit' | Font weight of the number. |
textColor | 'inherit' | Color of the number. | |
gap | Space between digits and symbols in px. | ||
padding | Extra height in px added to each digit, which also spaces out rolling digits. | ||
tabular | Keeps every digit the same width. When off, widths ease between digits as they roll. | ||
digitStyle | Styles for each digit box, for example a tile background with padding and radius. | ||
| Extra class names for the root. | |||
| Inline styles for the root. |
valuenumberThe number to show. Digits roll to every new value.
localestringLocale used for separators, symbols and numerals.
'en-US'formatIntl.NumberFormatOptionsFormatting options such as currency, percent, units or compact notation.
decimalsnumberFixed number of decimal places. Leave it out to use the format defaults.
minDigitsnumberPads the whole part with leading zeros.
prefixReactNodeContent shown before the number.
suffixReactNodeContent shown after the number.
direction'auto' | 'up' | 'down' | 'shortest'Which way digits roll. Auto rolls up as the number grows and down as it shrinks.
'auto'durationnumberRoughly how long a roll takes, in seconds.
0.7bouncenumberHow much digits overshoot before settling, from 0 to 0.9.
0.2staggernumberDelay in seconds between neighbouring digits, so changes ripple from the right.
0.04motionBlurbooleanBlurs digits along their path while they spin fast.
introbooleanSpins every digit once and lands it when the counter first scrolls into view.
fadenumberHow far in em digits roll beyond the text before fading out. 0 clips them at the edge.
0.3fontSizenumber | stringFont size in px, or any CSS size such as inherit.
100fontWeightnumber | stringFont weight of the number.
'inherit'textColorstringColor of the number.
'inherit'gapnumberSpace between digits and symbols in px.
paddingnumberExtra height in px added to each digit, which also spaces out rolling digits.
tabularbooleanKeeps every digit the same width. When off, widths ease between digits as they roll.
digitStyleCSSPropertiesStyles for each digit box, for example a tile background with padding and radius.
Extra class names for the root.
Inline styles for the root.



