- Docs
- Components
- Text
- Speeding Text
Speeding Text
Text that stretches and smears as it races past the viewport
Customize
Props
28| Name | Type | Default | Description |
|---|---|---|---|
value | number | 20000 | Number the counter travels to. |
from | number | 0 | Value the counter starts from. |
words | string[] | - | Words cycled in place instead of counting. |
duration | number | 2200 | Milliseconds the counter takes to reach the value. |
interval | number | 1400 | Milliseconds each word is held before the next swap. |
swapDuration | number | 520 | Milliseconds a word swap takes. |
travel | number | 90 | Horizontal distance a swapping word travels, in pixels. |
decimals | number | 0 | Decimal places kept on the counter. |
locale | string | "en-US" | Locale used for digit grouping. |
prefix | string | "" | Text placed before the value. |
suffix | string | "" | Text placed after the value. |
blurStrength | number | 1 | Multiplier on how readily speed turns into blur. |
maxBlur | number | 14 | Upper bound on the blur radius in pixels. |
showSeparator | boolean | true | Fade the group separators in as digits arrive. |
fontSize | number | 96 | Font size in pixels. |
fontWeight | number | 700 | Font weight. |
italic | boolean | true | Slant the glyphs. |
textColor | string | "#0a0a0a" | Colour of the glyphs. |
backgroundColor | string | "transparent" | Colour behind the glyphs. |
align | "left" | "center" | "right" | "center" | Horizontal placement inside the box. |
startOnView | boolean | true | Hold the run until the element scrolls into view. |
loop | boolean | false | Restart once the run finishes. |
loopDelay | number | 900 | Milliseconds to wait before a looped restart. |
paused | boolean | false | Freeze the animation. |
width | string | number | "100%" | Width of the container. |
height | string | number | "100%" | Height of the container. |
className | string | - | Extra classes for the container. |
style | CSSProperties | - | Inline styles for the container. |
valuenumberNumber the counter travels to.
20000fromnumberValue the counter starts from.
0wordsstring[]Words cycled in place instead of counting.
-durationnumberMilliseconds the counter takes to reach the value.
2200intervalnumberMilliseconds each word is held before the next swap.
1400swapDurationnumberMilliseconds a word swap takes.
520travelnumberHorizontal distance a swapping word travels, in pixels.
90decimalsnumberDecimal places kept on the counter.
0localestringLocale used for digit grouping.
"en-US"prefixstringText placed before the value.
""suffixstringText placed after the value.
""blurStrengthnumberMultiplier on how readily speed turns into blur.
1maxBlurnumberUpper bound on the blur radius in pixels.
14showSeparatorbooleanFade the group separators in as digits arrive.
truefontSizenumberFont size in pixels.
96fontWeightnumberFont weight.
700italicbooleanSlant the glyphs.
truetextColorstringColour of the glyphs.
"#0a0a0a"backgroundColorstringColour behind the glyphs.
"transparent"align"left" | "center" | "right"Horizontal placement inside the box.
"center"startOnViewbooleanHold the run until the element scrolls into view.
trueloopbooleanRestart once the run finishes.
falseloopDelaynumberMilliseconds to wait before a looped restart.
900pausedbooleanFreeze the animation.
falsewidthstring | numberWidth of the container.
"100%"heightstring | numberHeight of the container.
"100%"classNamestringExtra classes for the container.
-styleCSSPropertiesInline styles for the container.
-