@coinbase/cds-mcp-server 8.17.2 → 8.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/mcp-docs/mobile/components/Accordion.txt +189 -0
  3. package/mcp-docs/mobile/components/AccordionItem.txt +30 -0
  4. package/mcp-docs/mobile/components/Alert.txt +156 -0
  5. package/mcp-docs/mobile/components/AreaChart.txt +266 -0
  6. package/mcp-docs/mobile/components/Avatar.txt +196 -0
  7. package/mcp-docs/mobile/components/AvatarButton.txt +226 -0
  8. package/mcp-docs/mobile/components/Banner.txt +222 -0
  9. package/mcp-docs/mobile/components/BarChart.txt +816 -0
  10. package/mcp-docs/mobile/components/Box.txt +174 -0
  11. package/mcp-docs/mobile/components/BrowserBar.txt +147 -0
  12. package/mcp-docs/mobile/components/Button.txt +199 -0
  13. package/mcp-docs/mobile/components/ButtonGroup.txt +80 -0
  14. package/mcp-docs/mobile/components/Carousel.txt +1084 -0
  15. package/mcp-docs/mobile/components/CartesianChart.txt +826 -0
  16. package/mcp-docs/mobile/components/CellMedia.txt +71 -0
  17. package/mcp-docs/mobile/components/Checkbox.txt +246 -0
  18. package/mcp-docs/mobile/components/CheckboxCell.txt +202 -0
  19. package/mcp-docs/mobile/components/CheckboxGroup.txt +285 -0
  20. package/mcp-docs/mobile/components/Chip.txt +195 -0
  21. package/mcp-docs/mobile/components/Coachmark.txt +158 -0
  22. package/mcp-docs/mobile/components/Collapsible.txt +105 -0
  23. package/mcp-docs/mobile/components/ContainedAssetCard.txt +135 -0
  24. package/mcp-docs/mobile/components/ContentCard.txt +366 -0
  25. package/mcp-docs/mobile/components/ContentCardBody.txt +136 -0
  26. package/mcp-docs/mobile/components/ContentCardFooter.txt +128 -0
  27. package/mcp-docs/mobile/components/ContentCardHeader.txt +146 -0
  28. package/mcp-docs/mobile/components/ContentCell.txt +227 -0
  29. package/mcp-docs/mobile/components/ControlGroup.txt +444 -0
  30. package/mcp-docs/mobile/components/DatePicker.txt +497 -0
  31. package/mcp-docs/mobile/components/Divider.txt +139 -0
  32. package/mcp-docs/mobile/components/DotCount.txt +146 -0
  33. package/mcp-docs/mobile/components/DotStatusColor.txt +59 -0
  34. package/mcp-docs/mobile/components/DotSymbol.txt +135 -0
  35. package/mcp-docs/mobile/components/Fallback.txt +158 -0
  36. package/mcp-docs/mobile/components/FloatingAssetCard.txt +156 -0
  37. package/mcp-docs/mobile/components/HStack.txt +235 -0
  38. package/mcp-docs/mobile/components/HeroSquare.txt +48 -0
  39. package/mcp-docs/mobile/components/Icon.txt +52 -0
  40. package/mcp-docs/mobile/components/IconButton.txt +269 -0
  41. package/mcp-docs/mobile/components/InputChip.txt +188 -0
  42. package/mcp-docs/mobile/components/Interactable.txt +187 -0
  43. package/mcp-docs/mobile/components/LineChart.txt +1325 -0
  44. package/mcp-docs/mobile/components/Link.txt +292 -0
  45. package/mcp-docs/mobile/components/ListCell.txt +391 -0
  46. package/mcp-docs/mobile/components/LogoMark.txt +85 -0
  47. package/mcp-docs/mobile/components/LogoWordMark.txt +94 -0
  48. package/mcp-docs/mobile/components/Lottie.txt +139 -0
  49. package/mcp-docs/mobile/components/LottieStatusAnimation.txt +47 -0
  50. package/mcp-docs/mobile/components/Modal.txt +84 -0
  51. package/mcp-docs/mobile/components/ModalBody.txt +34 -0
  52. package/mcp-docs/mobile/components/ModalFooter.txt +25 -0
  53. package/mcp-docs/mobile/components/ModalHeader.txt +28 -0
  54. package/mcp-docs/mobile/components/MultiContentModule.txt +380 -0
  55. package/mcp-docs/mobile/components/NavigationTitle.txt +132 -0
  56. package/mcp-docs/mobile/components/NavigationTitleSelect.txt +142 -0
  57. package/mcp-docs/mobile/components/NudgeCard.txt +90 -0
  58. package/mcp-docs/mobile/components/Numpad.txt +341 -0
  59. package/mcp-docs/mobile/components/Overlay.txt +152 -0
  60. package/mcp-docs/mobile/components/PageFooter.txt +161 -0
  61. package/mcp-docs/mobile/components/PageHeader.txt +186 -0
  62. package/mcp-docs/mobile/components/PeriodSelector.txt +408 -0
  63. package/mcp-docs/mobile/components/Pictogram.txt +48 -0
  64. package/mcp-docs/mobile/components/Point.txt +205 -0
  65. package/mcp-docs/mobile/components/PortalProvider.txt +79 -0
  66. package/mcp-docs/mobile/components/Pressable.txt +211 -0
  67. package/mcp-docs/mobile/components/ProgressBar.txt +130 -0
  68. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +161 -0
  69. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +138 -0
  70. package/mcp-docs/mobile/components/ProgressCircle.txt +237 -0
  71. package/mcp-docs/mobile/components/Radio.txt +242 -0
  72. package/mcp-docs/mobile/components/RadioCell.txt +202 -0
  73. package/mcp-docs/mobile/components/RadioGroup.txt +282 -0
  74. package/mcp-docs/mobile/components/ReferenceLine.txt +153 -0
  75. package/mcp-docs/mobile/components/RemoteImage.txt +106 -0
  76. package/mcp-docs/mobile/components/RemoteImageGroup.txt +61 -0
  77. package/mcp-docs/mobile/components/RollingNumber.txt +789 -0
  78. package/mcp-docs/mobile/components/Scrubber.txt +204 -0
  79. package/mcp-docs/mobile/components/SearchInput.txt +192 -0
  80. package/mcp-docs/mobile/components/SectionHeader.txt +205 -0
  81. package/mcp-docs/mobile/components/SegmentedTabs.txt +316 -0
  82. package/mcp-docs/mobile/components/Select.txt +212 -0
  83. package/mcp-docs/mobile/components/SelectChip.txt +324 -0
  84. package/mcp-docs/mobile/components/SelectOption.txt +85 -0
  85. package/mcp-docs/mobile/components/SlideButton.txt +331 -0
  86. package/mcp-docs/mobile/components/Spacer.txt +84 -0
  87. package/mcp-docs/mobile/components/Sparkline.txt +123 -0
  88. package/mcp-docs/mobile/components/SparklineGradient.txt +107 -0
  89. package/mcp-docs/mobile/components/SparklineInteractive.txt +157 -0
  90. package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +73 -0
  91. package/mcp-docs/mobile/components/Spinner.txt +49 -0
  92. package/mcp-docs/mobile/components/SpotIcon.txt +48 -0
  93. package/mcp-docs/mobile/components/SpotRectangle.txt +48 -0
  94. package/mcp-docs/mobile/components/SpotSquare.txt +48 -0
  95. package/mcp-docs/mobile/components/Stepper.txt +528 -0
  96. package/mcp-docs/mobile/components/SubBrandLogoMark.txt +126 -0
  97. package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +126 -0
  98. package/mcp-docs/mobile/components/Switch.txt +98 -0
  99. package/mcp-docs/mobile/components/TabIndicator.txt +49 -0
  100. package/mcp-docs/mobile/components/TabLabel.txt +154 -0
  101. package/mcp-docs/mobile/components/TabNavigation.txt +147 -0
  102. package/mcp-docs/mobile/components/TabbedChips.txt +143 -0
  103. package/mcp-docs/mobile/components/Tabs.txt +191 -0
  104. package/mcp-docs/mobile/components/Tag.txt +301 -0
  105. package/mcp-docs/mobile/components/Text.txt +212 -0
  106. package/mcp-docs/mobile/components/TextInput.txt +718 -0
  107. package/mcp-docs/mobile/components/ThemeProvider.txt +133 -0
  108. package/mcp-docs/mobile/components/Toast.txt +197 -0
  109. package/mcp-docs/mobile/components/Tooltip.txt +60 -0
  110. package/mcp-docs/mobile/components/TopNavBar.txt +162 -0
  111. package/mcp-docs/mobile/components/Tour.txt +159 -0
  112. package/mcp-docs/mobile/components/Tray.txt +253 -0
  113. package/mcp-docs/mobile/components/UpsellCard.txt +322 -0
  114. package/mcp-docs/mobile/components/VStack.txt +223 -0
  115. package/mcp-docs/mobile/components/XAxis.txt +622 -0
  116. package/mcp-docs/mobile/components/YAxis.txt +568 -0
  117. package/mcp-docs/mobile/getting-started/introduction.txt +99 -0
  118. package/mcp-docs/mobile/getting-started/mcp-server.txt +94 -0
  119. package/mcp-docs/mobile/getting-started/playground.txt +25 -0
  120. package/mcp-docs/mobile/hooks/useDimensions.txt +47 -0
  121. package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +215 -0
  122. package/mcp-docs/mobile/hooks/useTheme.txt +110 -0
  123. package/mcp-docs/mobile/routes.txt +132 -0
  124. package/mcp-docs/web/components/Accordion.txt +190 -0
  125. package/mcp-docs/web/components/AccordionItem.txt +32 -0
  126. package/mcp-docs/web/components/Alert.txt +165 -0
  127. package/mcp-docs/web/components/AreaChart.txt +511 -0
  128. package/mcp-docs/web/components/Avatar.txt +212 -0
  129. package/mcp-docs/web/components/AvatarButton.txt +241 -0
  130. package/mcp-docs/web/components/Banner.txt +227 -0
  131. package/mcp-docs/web/components/BarChart.txt +1268 -0
  132. package/mcp-docs/web/components/Box.txt +176 -0
  133. package/mcp-docs/web/components/Button.txt +213 -0
  134. package/mcp-docs/web/components/ButtonGroup.txt +80 -0
  135. package/mcp-docs/web/components/Calendar.txt +182 -0
  136. package/mcp-docs/web/components/Carousel.txt +1576 -0
  137. package/mcp-docs/web/components/CartesianChart.txt +1045 -0
  138. package/mcp-docs/web/components/CellMedia.txt +57 -0
  139. package/mcp-docs/web/components/Checkbox.txt +189 -0
  140. package/mcp-docs/web/components/CheckboxCell.txt +203 -0
  141. package/mcp-docs/web/components/CheckboxGroup.txt +220 -0
  142. package/mcp-docs/web/components/Chip.txt +197 -0
  143. package/mcp-docs/web/components/Coachmark.txt +189 -0
  144. package/mcp-docs/web/components/Collapsible.txt +120 -0
  145. package/mcp-docs/web/components/ContainedAssetCard.txt +233 -0
  146. package/mcp-docs/web/components/ContentCard.txt +368 -0
  147. package/mcp-docs/web/components/ContentCardBody.txt +138 -0
  148. package/mcp-docs/web/components/ContentCardFooter.txt +130 -0
  149. package/mcp-docs/web/components/ContentCardHeader.txt +148 -0
  150. package/mcp-docs/web/components/ContentCell.txt +220 -0
  151. package/mcp-docs/web/components/ControlGroup.txt +437 -0
  152. package/mcp-docs/web/components/DatePicker.txt +506 -0
  153. package/mcp-docs/web/components/Divider.txt +144 -0
  154. package/mcp-docs/web/components/DotCount.txt +150 -0
  155. package/mcp-docs/web/components/DotStatusColor.txt +59 -0
  156. package/mcp-docs/web/components/DotSymbol.txt +138 -0
  157. package/mcp-docs/web/components/Dropdown.txt +120 -0
  158. package/mcp-docs/web/components/Fallback.txt +164 -0
  159. package/mcp-docs/web/components/FloatingAssetCard.txt +251 -0
  160. package/mcp-docs/web/components/FullscreenAlert.txt +70 -0
  161. package/mcp-docs/web/components/FullscreenModal.txt +146 -0
  162. package/mcp-docs/web/components/FullscreenModalLayout.txt +188 -0
  163. package/mcp-docs/web/components/Grid.txt +237 -0
  164. package/mcp-docs/web/components/GridColumn.txt +210 -0
  165. package/mcp-docs/web/components/HStack.txt +237 -0
  166. package/mcp-docs/web/components/HeroSquare.txt +49 -0
  167. package/mcp-docs/web/components/Icon.txt +146 -0
  168. package/mcp-docs/web/components/IconButton.txt +391 -0
  169. package/mcp-docs/web/components/InputChip.txt +188 -0
  170. package/mcp-docs/web/components/Interactable.txt +194 -0
  171. package/mcp-docs/web/components/LineChart.txt +1577 -0
  172. package/mcp-docs/web/components/Link.txt +244 -0
  173. package/mcp-docs/web/components/ListCell.txt +397 -0
  174. package/mcp-docs/web/components/LogoMark.txt +85 -0
  175. package/mcp-docs/web/components/LogoWordMark.txt +94 -0
  176. package/mcp-docs/web/components/Lottie.txt +158 -0
  177. package/mcp-docs/web/components/LottieStatusAnimation.txt +58 -0
  178. package/mcp-docs/web/components/MediaQueryProvider.txt +109 -0
  179. package/mcp-docs/web/components/Modal.txt +193 -0
  180. package/mcp-docs/web/components/ModalBody.txt +118 -0
  181. package/mcp-docs/web/components/ModalFooter.txt +120 -0
  182. package/mcp-docs/web/components/ModalHeader.txt +124 -0
  183. package/mcp-docs/web/components/MultiContentModule.txt +382 -0
  184. package/mcp-docs/web/components/NavigationBar.txt +103 -0
  185. package/mcp-docs/web/components/NavigationTitle.txt +26 -0
  186. package/mcp-docs/web/components/NavigationTitleSelect.txt +46 -0
  187. package/mcp-docs/web/components/NudgeCard.txt +182 -0
  188. package/mcp-docs/web/components/Overlay.txt +172 -0
  189. package/mcp-docs/web/components/PageFooter.txt +185 -0
  190. package/mcp-docs/web/components/PageHeader.txt +244 -0
  191. package/mcp-docs/web/components/Pagination.txt +500 -0
  192. package/mcp-docs/web/components/PeriodSelector.txt +704 -0
  193. package/mcp-docs/web/components/Pictogram.txt +49 -0
  194. package/mcp-docs/web/components/Point.txt +461 -0
  195. package/mcp-docs/web/components/PortalProvider.txt +77 -0
  196. package/mcp-docs/web/components/Pressable.txt +194 -0
  197. package/mcp-docs/web/components/ProgressBar.txt +164 -0
  198. package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +213 -0
  199. package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +182 -0
  200. package/mcp-docs/web/components/ProgressCircle.txt +444 -0
  201. package/mcp-docs/web/components/Radio.txt +220 -0
  202. package/mcp-docs/web/components/RadioCell.txt +216 -0
  203. package/mcp-docs/web/components/RadioGroup.txt +289 -0
  204. package/mcp-docs/web/components/ReferenceLine.txt +452 -0
  205. package/mcp-docs/web/components/RemoteImage.txt +166 -0
  206. package/mcp-docs/web/components/RemoteImageGroup.txt +87 -0
  207. package/mcp-docs/web/components/RollingNumber.txt +1022 -0
  208. package/mcp-docs/web/components/Scrubber.txt +232 -0
  209. package/mcp-docs/web/components/SearchInput.txt +118 -0
  210. package/mcp-docs/web/components/SectionHeader.txt +218 -0
  211. package/mcp-docs/web/components/SegmentedTabs.txt +325 -0
  212. package/mcp-docs/web/components/Select.txt +225 -0
  213. package/mcp-docs/web/components/SelectChip.txt +315 -0
  214. package/mcp-docs/web/components/SelectOption.txt +166 -0
  215. package/mcp-docs/web/components/Sidebar.txt +350 -0
  216. package/mcp-docs/web/components/SidebarItem.txt +132 -0
  217. package/mcp-docs/web/components/SidebarMoreMenu.txt +31 -0
  218. package/mcp-docs/web/components/Spacer.txt +174 -0
  219. package/mcp-docs/web/components/Sparkline.txt +123 -0
  220. package/mcp-docs/web/components/SparklineGradient.txt +107 -0
  221. package/mcp-docs/web/components/SparklineInteractive.txt +154 -0
  222. package/mcp-docs/web/components/SparklineInteractiveHeader.txt +77 -0
  223. package/mcp-docs/web/components/Spinner.txt +129 -0
  224. package/mcp-docs/web/components/SpotIcon.txt +49 -0
  225. package/mcp-docs/web/components/SpotRectangle.txt +49 -0
  226. package/mcp-docs/web/components/SpotSquare.txt +49 -0
  227. package/mcp-docs/web/components/Stepper.txt +683 -0
  228. package/mcp-docs/web/components/SubBrandLogoMark.txt +126 -0
  229. package/mcp-docs/web/components/SubBrandLogoWordMark.txt +126 -0
  230. package/mcp-docs/web/components/Switch.txt +86 -0
  231. package/mcp-docs/web/components/TabIndicator.txt +49 -0
  232. package/mcp-docs/web/components/TabLabel.txt +159 -0
  233. package/mcp-docs/web/components/TabNavigation.txt +160 -0
  234. package/mcp-docs/web/components/TabbedChips.txt +156 -0
  235. package/mcp-docs/web/components/Table.txt +368 -0
  236. package/mcp-docs/web/components/TableBody.txt +84 -0
  237. package/mcp-docs/web/components/TableCaption.txt +103 -0
  238. package/mcp-docs/web/components/TableCell.txt +166 -0
  239. package/mcp-docs/web/components/TableCellFallback.txt +98 -0
  240. package/mcp-docs/web/components/TableFooter.txt +84 -0
  241. package/mcp-docs/web/components/TableHeader.txt +101 -0
  242. package/mcp-docs/web/components/TableRow.txt +141 -0
  243. package/mcp-docs/web/components/Tabs.txt +213 -0
  244. package/mcp-docs/web/components/Tag.txt +305 -0
  245. package/mcp-docs/web/components/Text.txt +233 -0
  246. package/mcp-docs/web/components/TextInput.txt +653 -0
  247. package/mcp-docs/web/components/ThemeProvider.txt +200 -0
  248. package/mcp-docs/web/components/TileButton.txt +159 -0
  249. package/mcp-docs/web/components/Toast.txt +204 -0
  250. package/mcp-docs/web/components/Tooltip.txt +90 -0
  251. package/mcp-docs/web/components/Tour.txt +180 -0
  252. package/mcp-docs/web/components/Tray.txt +289 -0
  253. package/mcp-docs/web/components/UpsellCard.txt +320 -0
  254. package/mcp-docs/web/components/VStack.txt +225 -0
  255. package/mcp-docs/web/components/XAxis.txt +620 -0
  256. package/mcp-docs/web/components/YAxis.txt +549 -0
  257. package/mcp-docs/web/getting-started/introduction.txt +99 -0
  258. package/mcp-docs/web/getting-started/mcp-server.txt +94 -0
  259. package/mcp-docs/web/getting-started/playground.txt +25 -0
  260. package/mcp-docs/web/hooks/useBreakpoints.txt +33 -0
  261. package/mcp-docs/web/hooks/useDimensions.txt +55 -0
  262. package/mcp-docs/web/hooks/useHasMounted.txt +55 -0
  263. package/mcp-docs/web/hooks/useIsoEffect.txt +42 -0
  264. package/mcp-docs/web/hooks/useMediaQuery.txt +94 -0
  265. package/mcp-docs/web/hooks/useOverlayContentContext.txt +217 -0
  266. package/mcp-docs/web/hooks/useScrollBlocker.txt +63 -0
  267. package/mcp-docs/web/hooks/useTheme.txt +105 -0
  268. package/mcp-docs/web/routes.txt +155 -0
  269. package/package.json +1 -1
@@ -0,0 +1,1022 @@
1
+ # RollingNumber
2
+
3
+ A numeric display that animates value changes with rolling digits.
4
+
5
+ ## Import
6
+
7
+ ```jsx
8
+ import { RollingNumber } from '@coinbase/cds-web/numbers/RollingNumber'
9
+ ```
10
+
11
+ ## Props
12
+
13
+ | Prop | Type | Required | Default | Description |
14
+ | --- | --- | --- | --- | --- |
15
+ | `value` | `number` | Yes | `-` | Number to display. |
16
+ | `RollingNumberAffixSectionComponent` | `RollingNumberAffixSectionComponent` | No | `-` | Component used to render prefix and suffix sections. |
17
+ | `RollingNumberDigitComponent` | `RollingNumberDigitComponent` | No | `-` | Component used to render individual digits. |
18
+ | `RollingNumberMaskComponent` | `RollingNumberMaskComponent` | No | `-` | Component used to render the mask container. |
19
+ | `RollingNumberSymbolComponent` | `RollingNumberSymbolComponent` | No | `-` | Component used to render separators and other symbols. |
20
+ | `RollingNumberValueSectionComponent` | `RollingNumberValueSectionComponent` | No | `-` | Component used to render the numeric sections. |
21
+ | `accessibilityLabelPrefix` | `string` | No | `-` | Accessibility label prefix announced before the value. |
22
+ | `accessibilityLabelSuffix` | `string` | No | `-` | Accessibility label suffix announced after the value. |
23
+ | `alignContent` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| space-between \| space-around \| space-evenly>` | No | `-` | - |
24
+ | `alignItems` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
25
+ | `alignSelf` | `ResponsiveProp<center \| normal \| auto \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
26
+ | `ariaLive` | `off \| assertive \| polite` | No | `-` | aria-live politeness level. Defaults to {@code polite}. |
27
+ | `as` | `symbol \| object \| style \| svg \| a \| abbr \| address \| area \| article \| aside \| audio \| b \| base \| bdi \| bdo \| big \| blockquote \| body \| br \| button \| canvas \| caption \| center \| cite \| code \| col \| colgroup \| data \| datalist \| dd \| del \| details \| dfn \| dialog \| div \| dl \| dt \| em \| embed \| fieldset \| figcaption \| figure \| footer \| form \| h1 \| h2 \| h3 \| h4 \| h5 \| h6 \| head \| header \| hgroup \| hr \| html \| i \| iframe \| img \| input \| ins \| kbd \| keygen \| label \| legend \| li \| link \| main \| map \| mark \| menu \| menuitem \| meta \| meter \| nav \| noindex \| noscript \| ol \| optgroup \| option \| output \| p \| param \| picture \| pre \| progress \| q \| rp \| rt \| ruby \| s \| samp \| search \| slot \| script \| section \| select \| small \| source \| span \| strong \| sub \| summary \| sup \| table \| template \| tbody \| td \| textarea \| tfoot \| th \| thead \| time \| title \| tr \| track \| u \| ul \| var \| video \| wbr \| webview \| animate \| animateMotion \| animateTransform \| circle \| clipPath \| defs \| desc \| ellipse \| feBlend \| feColorMatrix \| feComponentTransfer \| feComposite \| feConvolveMatrix \| feDiffuseLighting \| feDisplacementMap \| feDistantLight \| feDropShadow \| feFlood \| feFuncA \| feFuncB \| feFuncG \| feFuncR \| feGaussianBlur \| feImage \| feMerge \| feMergeNode \| feMorphology \| feOffset \| fePointLight \| feSpecularLighting \| feSpotLight \| feTile \| feTurbulence \| filter \| foreignObject \| g \| image \| line \| linearGradient \| marker \| mask \| metadata \| mpath \| path \| pattern \| polygon \| polyline \| radialGradient \| rect \| set \| stop \| switch \| text \| textPath \| tspan \| use \| view \| ComponentClass<any, any> \| FunctionComponent<any>` | No | `-` | - |
28
+ | `aspectRatio` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
29
+ | `background` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
30
+ | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
31
+ | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
32
+ | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
33
+ | `borderColor` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
34
+ | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
35
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
36
+ | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
37
+ | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
38
+ | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
39
+ | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
40
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
41
+ | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
42
+ | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
43
+ | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
44
+ | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
45
+ | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
46
+ | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
47
+ | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
48
+ | `bottom` | `ResponsiveProp<Bottom<string \| number>>` | No | `-` | - |
49
+ | `classNames` | `{ root?: string; visibleContent?: string \| undefined; formattedValueSection?: string \| undefined; prefix?: string \| undefined; suffix?: string \| undefined; i18nPrefix?: string \| undefined; i18nSuffix?: string \| undefined; integer?: string \| undefined; fraction?: string \| undefined; text?: string \| undefined; } \| undefined` | No | `-` | Class name overrides applied to RollingNumber slots. |
50
+ | `color` | `((Color \| { base?: Color; phone?: Color \| undefined; tablet?: Color \| undefined; desktop?: Color \| undefined; }) & Color) \| undefined` | No | `-` | Base text color token. When {@link colorPulseOnUpdate } is true, the color briefly pulses to a positive or negative mid color before returning to this base color. Defaults to {@code fg}. |
51
+ | `colorPulseOnUpdate` | `boolean` | No | `-` | Enables color pulsing on positive or negative changes. Defaults to {@code false}. |
52
+ | `columnGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
53
+ | `dangerouslySetBackground` | `string` | No | `-` | - |
54
+ | `dangerouslySetColor` | `string` | No | `-` | - |
55
+ | `disabled` | `boolean` | No | `-` | - |
56
+ | `display` | `ResponsiveProp<grid \| revert \| none \| block \| inline \| inline-block \| flex \| inline-flex \| inline-grid \| contents \| flow-root \| list-item>` | No | `-` | - |
57
+ | `elevation` | `0 \| 1 \| 2` | No | `-` | - |
58
+ | `enableSubscriptNotation` | `boolean` | No | `-` | Enables subscript notation for leading zeros in the fractional part (for example, {@code 0.00009 => 0.0₄9}). |
59
+ | `flexBasis` | `ResponsiveProp<FlexBasis<string \| number>>` | No | `-` | - |
60
+ | `flexDirection` | `ResponsiveProp<column \| row \| row-reverse \| column-reverse>` | No | `-` | - |
61
+ | `flexGrow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
62
+ | `flexShrink` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
63
+ | `flexWrap` | `ResponsiveProp<nowrap \| wrap \| wrap-reverse>` | No | `-` | - |
64
+ | `font` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
65
+ | `fontFamily` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
66
+ | `fontSize` | `ResponsiveProp<FontSize \| inherit>` | No | `-` | - |
67
+ | `fontWeight` | `ResponsiveProp<FontWeight \| inherit>` | No | `-` | - |
68
+ | `format` | `(Omit<NumberFormatOptions, notation> & { notation?: compact \| standard; }) \| undefined` | No | `-` | Intl.NumberFormat options applied when formatting the value. Scientific and engineering notation are not supported. |
69
+ | `formattedValue` | `string` | No | `-` | Preformatted value rendered instead of formatting {@link value }. {@link value } is still used to determine numeric deltas. |
70
+ | `gap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
71
+ | `grid` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
72
+ | `gridArea` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
73
+ | `gridAutoColumns` | `ResponsiveProp<GridAutoColumns<string \| number>>` | No | `-` | - |
74
+ | `gridAutoFlow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| row \| column \| dense` | No | `-` | - |
75
+ | `gridAutoRows` | `ResponsiveProp<GridAutoRows<string \| number>>` | No | `-` | - |
76
+ | `gridColumn` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
77
+ | `gridColumnEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
78
+ | `gridColumnStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
79
+ | `gridRow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
80
+ | `gridRowEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
81
+ | `gridRowStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
82
+ | `gridTemplate` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
83
+ | `gridTemplateAreas` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
84
+ | `gridTemplateColumns` | `ResponsiveProp<GridTemplateColumns<string \| number>>` | No | `-` | - |
85
+ | `gridTemplateRows` | `ResponsiveProp<GridTemplateRows<string \| number>>` | No | `-` | - |
86
+ | `height` | `ResponsiveProp<Height<string \| number>>` | No | `-` | - |
87
+ | `justifyContent` | `ResponsiveProp<left \| right \| center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| space-between \| space-around \| space-evenly>` | No | `-` | - |
88
+ | `left` | `ResponsiveProp<Left<string \| number>>` | No | `-` | - |
89
+ | `lineHeight` | `ResponsiveProp<LineHeight \| inherit>` | No | `-` | - |
90
+ | `locale` | `string \| Locale \| readonly (string \| Locale)[]` | No | `-` | Locale used for formatting. Defaults to the locale from {@link LocaleProvider }. |
91
+ | `margin` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
92
+ | `marginBottom` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
93
+ | `marginEnd` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
94
+ | `marginStart` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
95
+ | `marginTop` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
96
+ | `marginX` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
97
+ | `marginY` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
98
+ | `maxHeight` | `ResponsiveProp<MaxHeight<string \| number>>` | No | `-` | - |
99
+ | `maxWidth` | `ResponsiveProp<MaxWidth<string \| number>>` | No | `-` | - |
100
+ | `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
101
+ | `minWidth` | `ResponsiveProp<MinWidth<string \| number>>` | No | `-` | - |
102
+ | `mono` | `boolean` | No | `-` | Use monospace font family. |
103
+ | `negativePulseColor` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | Color token used for negative numeric changes. Defaults to {@code fgNegative}. |
104
+ | `noWrap` | `boolean` | No | `false` | Set text to be in a single line. |
105
+ | `numberOfLines` | `number` | No | `-` | - |
106
+ | `opacity` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
107
+ | `overflow` | `clip \| wrap \| truncate \| break` | No | `-` | Set overflow behavior. |
108
+ | `padding` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
109
+ | `paddingBottom` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
110
+ | `paddingEnd` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
111
+ | `paddingStart` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
112
+ | `paddingTop` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
113
+ | `paddingX` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
114
+ | `paddingY` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
115
+ | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
116
+ | `position` | `ResponsiveProp<fixed \| static \| relative \| absolute \| sticky>` | No | `-` | - |
117
+ | `positivePulseColor` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | Color token used for positive numeric changes. Defaults to {@code fgPositive}. |
118
+ | `prefix` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Content rendered before the formatted value. |
119
+ | `ref` | `any` | No | `-` | - |
120
+ | `renderEmptyNode` | `boolean` | No | `-` | - |
121
+ | `right` | `ResponsiveProp<Right<string \| number>>` | No | `-` | - |
122
+ | `rowGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
123
+ | `slashedZero` | `boolean` | No | `false` | Use character for number zero with a slash through it to differentiate it from the letter O. |
124
+ | `style` | `CSSProperties` | No | `-` | - |
125
+ | `styles` | `{ root?: CSSProperties; visibleContent?: CSSProperties \| undefined; formattedValueSection?: CSSProperties \| undefined; prefix?: CSSProperties \| undefined; suffix?: CSSProperties \| undefined; i18nPrefix?: CSSProperties \| undefined; i18nSuffix?: CSSProperties \| undefined; integer?: CSSProperties \| undefined; fraction?: CSSProperties \| undefined; text?: CSSProperties \| undefined; } \| undefined` | No | `-` | Inline style overrides applied to RollingNumber slots. |
126
+ | `suffix` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Content rendered after the formatted value. |
127
+ | `tabularNumbers` | `boolean` | No | `false` | Activates the set of figures where numbers are all of the same size, allowing them to be easily aligned. Enables tabular figures on the underlying {@link Text}. Defaults to {@code true}. |
128
+ | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
129
+ | `textAlign` | `ResponsiveProp<center \| start \| end \| justify>` | No | `-` | - |
130
+ | `textDecoration` | `ResponsiveProp<none \| underline \| overline \| line-through \| underline overline \| underline double>` | No | `-` | - |
131
+ | `textTransform` | `ResponsiveProp<capitalize \| lowercase \| none \| uppercase>` | No | `-` | - |
132
+ | `top` | `ResponsiveProp<Top<string \| number>>` | No | `-` | - |
133
+ | `transform` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
134
+ | `transition` | `RollingNumberTransitionConfig` | No | `-` | Framer Motion transition overrides. Supports per-property overrides for {@code y} and {@code color} only. |
135
+ | `underline` | `boolean` | No | `false` | Set text decoration to underline. |
136
+ | `userSelect` | `ResponsiveProp<text \| none \| auto \| all>` | No | `-` | - |
137
+ | `visibility` | `ResponsiveProp<hidden \| visible>` | No | `-` | - |
138
+ | `width` | `ResponsiveProp<Width<string \| number>>` | No | `-` | - |
139
+ | `zIndex` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
140
+
141
+
142
+ ## Examples
143
+
144
+ ### Basic Example
145
+
146
+ RollingNumber displays changing numeric values with a smooth per-digit roll animation and optional color pulse. It supports full `Intl.NumberFormat` options, custom typography, ReactNode prefixes/suffixes, and accessibility.
147
+
148
+ Pass a number in the `value` prop. Use the `format` prop for Intl formatting (currency, percent, grouping, compact) instead of pre-formatting the string yourself.
149
+
150
+ ```tsx live
151
+ function Example() {
152
+ const values = [12345.67, 123340.011, 1220340.0123];
153
+ const [valIdx, setValIdx] = useState(0);
154
+
155
+ return (
156
+ <VStack gap={3}>
157
+ <RollingNumber value={values[valIdx]} font="display3" />
158
+ <Button
159
+ onClick={() => {
160
+ setValIdx((prev) => (prev + 1) % values.length);
161
+ }}
162
+ alignSelf="flex-start"
163
+ >
164
+ Next
165
+ </Button>
166
+ </VStack>
167
+ );
168
+ }
169
+ ```
170
+
171
+ ### Example Use Case
172
+
173
+ ```tsx live
174
+ function Examples() {
175
+ const [price, setPrice] = useState<number>(12345.67);
176
+ const [difference, setDifference] = useState<number>(0);
177
+ const onNext = () =>
178
+ setPrice((p) => {
179
+ const delta = (Math.random() - 0.5) * 200; // +/- 100
180
+ const next = Math.max(0, p + delta);
181
+ const newPrice = Math.round(next * 100) / 100;
182
+ setDifference(newPrice - p);
183
+ return newPrice;
184
+ });
185
+
186
+ const trendColor = difference >= 0 ? 'fgPositive' : 'fgNegative';
187
+
188
+ return (
189
+ <VStack gap={2}>
190
+ <Text font="label1">Portfolio Balance</Text>
191
+ <RollingNumber
192
+ colorPulseOnUpdate
193
+ font="display3"
194
+ format={{ style: 'currency', currency: 'USD' }}
195
+ value={price}
196
+ />
197
+ <HStack alignItems="center">
198
+ <RollingNumber
199
+ accessibilityLabelPrefix={difference > 0 ? 'up ' : difference < 0 ? 'down ' : ''}
200
+ color={trendColor}
201
+ font="body"
202
+ format={{
203
+ style: 'currency',
204
+ currency: 'USD',
205
+ minimumFractionDigits: 2,
206
+ maximumFractionDigits: 2,
207
+ }}
208
+ prefix={
209
+ difference >= 0 ? (
210
+ <Icon color={trendColor} name="diagonalUpArrow" size="xs" />
211
+ ) : (
212
+ <Icon color={trendColor} name="diagonalDownArrow" size="xs" />
213
+ )
214
+ }
215
+ styles={{
216
+ prefix: {
217
+ paddingRight: 'var(--space-1)',
218
+ },
219
+ }}
220
+ suffix={`(${((Math.abs(difference) / price) * 100).toFixed(2)}%)`}
221
+ value={Math.abs(difference)}
222
+ />
223
+ </HStack>
224
+ <Text font="label1">BTC Conversion</Text>
225
+ <HStack alignItems="center" gap={1}>
226
+ <Icon color="fgPrimary" name="arrowsVertical" size="xs" testID="swap-icon" />
227
+ <RollingNumber
228
+ color="fgPrimary"
229
+ fontFamily="body"
230
+ fontSize="body"
231
+ fontWeight="body"
232
+ format={{ minimumFractionDigits: 8, maximumFractionDigits: 8 }}
233
+ value={price / 150_000}
234
+ />
235
+ </HStack>
236
+ <Button alignSelf="flex-start" onClick={onNext}>
237
+ Next
238
+ </Button>
239
+ </VStack>
240
+ );
241
+ }
242
+ ```
243
+
244
+ ### Formatting
245
+
246
+ Use `format` prop for currency, percent, grouping, and compact notation formatting. The `format` prop takes in `Intl.NumberFormat` [options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options).
247
+
248
+ ```tsx live
249
+ function Example() {
250
+ const [value, setValue] = React.useState(92345.67);
251
+ const onNext = () => setValue((v) => v * 13.5);
252
+ return (
253
+ <VStack gap={2}>
254
+ <Text as="p" display="block" font="label1">
255
+ Compact number with currency sign
256
+ </Text>
257
+ <h1>
258
+ <RollingNumber
259
+ font="display1"
260
+ format={{
261
+ style: 'currency',
262
+ currency: 'USD',
263
+ minimumFractionDigits: 2,
264
+ maximumFractionDigits: 2,
265
+ notation: 'compact',
266
+ }}
267
+ value={value}
268
+ />
269
+ </h1>
270
+ <Button alignSelf="flex-start" onClick={onNext}>
271
+ Next
272
+ </Button>
273
+ <Text as="p" display="block" font="label1">
274
+ Number without grouping
275
+ </Text>
276
+ <RollingNumber
277
+ font="display1"
278
+ format={{
279
+ useGrouping: false,
280
+ }}
281
+ value={92345.67}
282
+ />
283
+ </VStack>
284
+ );
285
+ }
286
+ ```
287
+
288
+ ### Typography
289
+
290
+ RollingNumber forwards all Text props, but only character-level typographic props (e.g., `font`, `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `tabularNumbers`, `color`) are meaningful for its per-digit rendering. Layout/container props may have no effect—use them judiciously.
291
+
292
+ ```tsx live
293
+ function Example() {
294
+ const [price, setPrice] = React.useState(9876.54);
295
+ const onNext = () =>
296
+ setPrice((p) => Math.max(0, Math.round((p + (Math.random() - 0.5) * 100) * 100) / 100));
297
+ return (
298
+ <VStack gap={2}>
299
+ <Text as="p" display="block" font="label1">
300
+ Font sizes, weights, and line heights
301
+ </Text>
302
+ <RollingNumber
303
+ fontSize="display3"
304
+ fontWeight="title3"
305
+ value={price}
306
+ format={{ style: 'currency', currency: 'USD' }}
307
+ />
308
+ <RollingNumber
309
+ fontSize="title3"
310
+ fontWeight="headline"
311
+ value={price}
312
+ format={{ style: 'currency', currency: 'USD' }}
313
+ />
314
+ <RollingNumber
315
+ fontSize="body"
316
+ fontWeight="body"
317
+ lineHeight="display3"
318
+ value={price}
319
+ format={{ style: 'currency', currency: 'USD' }}
320
+ />
321
+ <Text as="p" display="block" font="label1">
322
+ Responsive font (phone, tablet, desktop)
323
+ </Text>
324
+ <RollingNumber
325
+ font={{ phone: 'body', tablet: 'title3', desktop: 'display3' }}
326
+ format={{ style: 'currency', currency: 'USD' }}
327
+ value={price}
328
+ />
329
+ <Text as="p" display="block" font="label1">
330
+ Tabular numbers vs non-tabular
331
+ </Text>
332
+ <RollingNumber
333
+ font="display3"
334
+ format={{ style: 'currency', currency: 'USD' }}
335
+ value={price}
336
+ />
337
+ <RollingNumber
338
+ tabularNumbers={false}
339
+ font="display3"
340
+ format={{ style: 'currency', currency: 'USD' }}
341
+ value={price}
342
+ />
343
+ <Button alignSelf="flex-start" onClick={onNext}>
344
+ Next
345
+ </Button>
346
+ </VStack>
347
+ );
348
+ }
349
+ ```
350
+
351
+ ::::tip Alignment
352
+ Keep `tabularNumbers` enabled (default) to avoid horizontal width shifting as digits change.
353
+ ::::
354
+
355
+ ### Color and Transition
356
+
357
+ Customize color and motion. Configure `y` to control the digit roll, and `color` for the pulse.
358
+
359
+ ##### `transition` prop
360
+
361
+ - Type: `{ y?: Transition; color?: Transition }` (framer-motion `Transition`)
362
+ - Optional `type`: `'tween' | 'spring' | 'inertia'`; defaults to `'tween'` if not provided
363
+ - Default: `{ y: { duration: durations.moderate3 / 1000, ease: curves.global }, color: { duration: durations.slow4 / 1000, ease: curves.global } }`
364
+
365
+ ```tsx live
366
+ function Example() {
367
+ const [price, setPrice] = React.useState(555.55);
368
+ const onNext = () =>
369
+ setPrice((p) => Math.max(0, Math.round((p + (Math.random() - 0.5) * 50) * 100) / 100));
370
+
371
+ return (
372
+ <VStack gap={2}>
373
+ <Text as="p" display="block" font="label1">
374
+ Color pulse and custom transition
375
+ </Text>
376
+ <RollingNumber
377
+ colorPulseOnUpdate
378
+ font="title1"
379
+ format={{ style: 'currency', currency: 'USD' }}
380
+ transition={{
381
+ color: { duration: 0.3, ease: 'easeInOut' },
382
+ y: { duration: 0.3, ease: 'easeIn' },
383
+ }}
384
+ value={price}
385
+ />
386
+
387
+ <RollingNumber
388
+ colorPulseOnUpdate
389
+ color="accentBoldBlue"
390
+ font="title1"
391
+ format={{ style: 'currency', currency: 'USD' }}
392
+ transition={{
393
+ color: { duration: 1.2, ease: 'easeInOut' },
394
+ y: { duration: 1.2, ease: 'easeIn' },
395
+ }}
396
+ value={price}
397
+ />
398
+
399
+ <Text as="p" display="block" font="label1">
400
+ Customize positive and negative change colors
401
+ </Text>
402
+ <RollingNumber
403
+ colorPulseOnUpdate
404
+ font="title1"
405
+ negativePulseColor="bgWarning"
406
+ positivePulseColor="fgPrimary"
407
+ value={price}
408
+ />
409
+
410
+ <Text as="p" display="block" font="label1">
411
+ Fast digits, slow color
412
+ </Text>
413
+ <RollingNumber
414
+ colorPulseOnUpdate
415
+ font="title1"
416
+ format={{ style: 'currency', currency: 'USD' }}
417
+ transition={{
418
+ y: { duration: 0.1, ease: 'easeIn' },
419
+ color: { duration: 1.2, ease: 'easeInOut' },
420
+ }}
421
+ value={price}
422
+ />
423
+
424
+ <Text as="p" display="block" font="label1">
425
+ Springy digits
426
+ </Text>
427
+ <RollingNumber
428
+ colorPulseOnUpdate
429
+ font="title1"
430
+ format={{ style: 'currency', currency: 'USD' }}
431
+ transition={{
432
+ y: {
433
+ type: 'spring',
434
+ stiffness: 1000,
435
+ damping: 24,
436
+ mass: 3,
437
+ },
438
+ }}
439
+ value={price}
440
+ />
441
+
442
+ <Text as="p" display="block" font="label1">
443
+ Custom easings
444
+ </Text>
445
+ <RollingNumber
446
+ colorPulseOnUpdate
447
+ font="title1"
448
+ format={{ style: 'currency', currency: 'USD' }}
449
+ transition={{
450
+ y: { duration: 0.25, ease: 'easeOut' },
451
+ color: { duration: 0.5, ease: 'easeInOut' },
452
+ }}
453
+ value={price}
454
+ />
455
+ <Button alignSelf="flex-start" onClick={onNext}>
456
+ Next
457
+ </Button>
458
+ </VStack>
459
+ );
460
+ }
461
+ ```
462
+
463
+ ### Prefix and Suffix
464
+
465
+ Attach text or React nodes before/after the number to create rich compositions. If the prefix/suffix is a string, it will pulse color together with the main number.
466
+
467
+ ```tsx live
468
+ function Example() {
469
+ const values = [98345.67, 91345.67, 123450.123, 1234512.88];
470
+ const textPrefixes = ['+', '-', ''];
471
+ const textSuffixes = [' BTC', ' ETH', ''];
472
+ const iconPrefixes = [
473
+ <Icon key="arrowUp" name="arrowUp" size="l" />,
474
+ <Icon key="arrowDown" name="arrowDown" size="l" />,
475
+ null,
476
+ ];
477
+ const iconSuffixes = [
478
+ <Icon key="arrowDown" name="arrowDown" size="l" />,
479
+ <Icon key="arrowUp" name="arrowUp" size="l" />,
480
+ null,
481
+ ];
482
+ const [idx, setIdx] = React.useState(0);
483
+ const onNext = () => setIdx((i) => (i + 1) % values.length);
484
+ const value = values[idx];
485
+ const format = {
486
+ style: 'currency' as const,
487
+ currency: 'USD',
488
+ minimumFractionDigits: 2,
489
+ maximumFractionDigits: 5,
490
+ };
491
+ return (
492
+ <VStack gap={2}>
493
+ <Text as="p" display="block" font="label1">
494
+ Simple text prefix and suffix
495
+ </Text>
496
+ <RollingNumber
497
+ colorPulseOnUpdate
498
+ font="display1"
499
+ format={format}
500
+ prefix={textPrefixes[idx]}
501
+ suffix={textSuffixes[idx]}
502
+ value={value}
503
+ />
504
+
505
+ <Text as="p" display="block" font="label1">
506
+ ReactNode prefix and suffix
507
+ </Text>
508
+ <RollingNumber
509
+ colorPulseOnUpdate
510
+ font="display1"
511
+ format={format}
512
+ prefix={iconPrefixes[idx]}
513
+ suffix={iconSuffixes[idx]}
514
+ value={value}
515
+ />
516
+
517
+ <Button alignSelf="flex-start" onClick={onNext}>
518
+ Next
519
+ </Button>
520
+ </VStack>
521
+ );
522
+ }
523
+ ```
524
+
525
+ ```tsx live
526
+ function SubscriptionPriceExample() {
527
+ const [yearly, setYearly] = React.useState(false);
528
+ const price = yearly ? 199 : 19;
529
+ const suffix = yearly ? '/yr' : '/mo';
530
+ return (
531
+ <VStack gap={1}>
532
+ <RollingNumber
533
+ colorPulseOnUpdate
534
+ accessibilityLabel={`$${price} ${suffix === '/yr' ? 'yearly' : 'monthly'}`}
535
+ font="display1"
536
+ format={{
537
+ style: 'currency',
538
+ currency: 'USD',
539
+ minimumFractionDigits: 0,
540
+ maximumFractionDigits: 0,
541
+ }}
542
+ styles={{
543
+ suffix: {
544
+ position: 'relative',
545
+ top: 'var(--space-1_5)',
546
+ color: 'var(--color-fgMuted)',
547
+ fontSize: 'var(--fontSize-title1)',
548
+ },
549
+ }}
550
+ suffix={suffix}
551
+ transition={{
552
+ y: { type: 'spring', stiffness: 80, damping: 24, mass: 3 },
553
+ }}
554
+ value={price}
555
+ />
556
+ <Button alignSelf="flex-start" onClick={() => setYearly((v) => !v)}>
557
+ {yearly ? 'Switch to monthly' : 'Switch to yearly'}
558
+ </Button>
559
+ </VStack>
560
+ );
561
+ }
562
+ ```
563
+
564
+ ::::tip Accessibility
565
+ When using React nodes for `prefix`/`suffix`, provide an `accessibilityLabel` or use `accessibilityLabelPrefix`/`accessibilityLabelSuffix` so screen readers announce a descriptive string.
566
+ ::::
567
+
568
+ ### Style Overrides
569
+
570
+ Customize the look of each logical section (`i18nPrefix`, `integer`, `fraction`, `i18nSuffix`, `prefix`, `suffix`).
571
+
572
+ ```tsx live
573
+ function Example() {
574
+ const [price, setPrice] = React.useState(12345.67);
575
+ const onNext = () => {
576
+ setPrice((p) => Math.max(0, Math.round((p + (Math.random() - 0.5) * 200) * 100) / 100));
577
+ };
578
+ return (
579
+ <VStack gap={2}>
580
+ <Text as="p" display="block" font="label1">
581
+ Customize per-section styles
582
+ </Text>
583
+ <RollingNumber
584
+ colorPulseOnUpdate
585
+ font="display1"
586
+ format={{
587
+ style: 'currency',
588
+ currency: 'USD',
589
+ minimumFractionDigits: 2,
590
+ notation: 'compact',
591
+ }}
592
+ prefix="-"
593
+ styles={{
594
+ root: {
595
+ border: '1px dashed var(--color-bgLine)',
596
+ padding: '4px 8px',
597
+ borderRadius: 8,
598
+ background: 'var(--color-bgSecondaryWash)',
599
+ },
600
+ i18nPrefix: { color: 'var(--color-accentBoldBlue)' },
601
+ prefix: { color: 'var(--color-accentBoldPurple)' },
602
+ integer: { letterSpacing: '-1px' },
603
+ fraction: { opacity: 0.2, letterSpacing: '10px' },
604
+ i18nSuffix: { color: 'var(--color-fgMuted)' },
605
+ suffix: { color: 'var(--color-accentBoldYellow)', marginLeft: 10 },
606
+ }}
607
+ suffix="BTC"
608
+ value={price}
609
+ />
610
+ <Button alignSelf="flex-start" onClick={onNext}>
611
+ Next
612
+ </Button>
613
+ </VStack>
614
+ );
615
+ }
616
+ ```
617
+
618
+ ### Subscript Notation for Tiny Decimals
619
+
620
+ Enable `enableSubscriptNotation` to compactly represent leading zeros in the fractional part.
621
+
622
+ ```tsx live
623
+ function Example() {
624
+ const values = [0.0000000001, 0.00009, 0.000012, 0.0000001, 0.000000000000000000000011];
625
+ const [idx, setIdx] = React.useState(0);
626
+ const value = values[idx];
627
+ const format = { minimumFractionDigits: 2, maximumFractionDigits: 25 };
628
+ return (
629
+ <VStack gap={1}>
630
+ <Text as="p" display="block" font="label1">
631
+ Subscript examples
632
+ </Text>
633
+ <Text as="span" display="block" font="label2">
634
+ Default:
635
+ </Text>
636
+ <RollingNumber font="display3" format={format} value={value} />
637
+ <Text as="span" display="block" font="label2">
638
+ With subscript:
639
+ </Text>
640
+ {(['display1', 'title3', 'body'] as const).map((fontKey) => (
641
+ <RollingNumber
642
+ key={fontKey}
643
+ enableSubscriptNotation
644
+ font={fontKey}
645
+ format={format}
646
+ value={value}
647
+ />
648
+ ))}
649
+ <Button alignSelf="flex-start" onClick={() => setIdx((i) => (i + 1) % values.length)}>
650
+ Next
651
+ </Button>
652
+ </VStack>
653
+ );
654
+ }
655
+ ```
656
+
657
+ ### User-Provided Formatted Value
658
+
659
+ You can also provide `formattedValue`, and the component will render `formattedValue` directly instead of using the internal formatter. The numeric `value` is still required to drive animations and color pulse.
660
+
661
+ ```tsx live
662
+ function Example() {
663
+ const btcPrices = [
664
+ { value: 98765.43, formattedValue: '¥98,765.43 BTC' },
665
+ { value: 931.42, formattedValue: '$931.42 BTC' },
666
+ { value: 100890.56, formattedValue: '¥100,890.56 BTC' },
667
+ { value: 149432.12, formattedValue: '¥149,432.12 BTC' },
668
+ { value: 150321.23, formattedValue: '¥150,321.23 BTC' },
669
+ ];
670
+ const subscripts = [
671
+ { value: 0.0000000001, formattedValue: '€0,0₉1', accessibilityLabel: '€0.0000000001' },
672
+ { value: 0.00009, formattedValue: '€0,0₄9', accessibilityLabel: '€0.00009' },
673
+ { value: 0.000012, formattedValue: '€0,0₄12', accessibilityLabel: '€0.000012' },
674
+ { value: 0.0000001, formattedValue: '€0,0₆1', accessibilityLabel: '€0.0000001' },
675
+ {
676
+ value: 0.000000000000000000000011,
677
+ formattedValue: '€0,0₂₂11',
678
+ accessibilityLabel: '€0.000000000000000000000011',
679
+ },
680
+ ];
681
+ const [idx, setIdx] = React.useState(0);
682
+ const onNext = () => setIdx((i) => (i + 1) % 5);
683
+ return (
684
+ <VStack gap={1}>
685
+ <Text as="p" display="block" font="label1">
686
+ User-provided formatted value
687
+ </Text>
688
+ <Text as="p" display="block" font="label2">
689
+ BTC prices
690
+ </Text>
691
+ <RollingNumber
692
+ colorPulseOnUpdate
693
+ font="display3"
694
+ formattedValue={btcPrices[idx].formattedValue}
695
+ prefix={<Icon name="crypto" size="l" />}
696
+ value={btcPrices[idx].value}
697
+ />
698
+ <Text as="p" display="block" font="label2">
699
+ Subscripts with a comma as the decimal separator
700
+ </Text>
701
+ <RollingNumber
702
+ colorPulseOnUpdate
703
+ accessibilityLabel={subscripts[idx].accessibilityLabel}
704
+ font="display3"
705
+ formattedValue={subscripts[idx].formattedValue}
706
+ value={subscripts[idx].value}
707
+ />
708
+ <Button alignSelf="flex-start" onClick={onNext}>
709
+ Next
710
+ </Button>
711
+ </VStack>
712
+ );
713
+ }
714
+ ```
715
+
716
+ ::::tip Accessibility and formattedValue
717
+ When you provide `formattedValue`, the `accessibilityLabel` will default to your `formattedValue`. However, what’s rendered on screen is not always ideal for accessibility. For example, the subscript notation '0₉' may be announced as '09'. Provide your own `accessibilityLabel` as needed.
718
+ ::::
719
+
720
+ ### Patterns & Recipes
721
+
722
+ Practical demos combining formatting, animation, and interactivity.
723
+
724
+ #### Counter
725
+
726
+ ```tsx live
727
+ function CounterExample() {
728
+ const [count, setCount] = React.useState(0);
729
+ return (
730
+ <VStack gap={1}>
731
+ <HStack alignItems="center" gap={2}>
732
+ <IconButton name="minus" onClick={() => setCount((c) => Math.max(0, c - 1))} />
733
+ <RollingNumber
734
+ colorPulseOnUpdate
735
+ font="display1"
736
+ format={{ minimumFractionDigits: 0, maximumFractionDigits: 0 }}
737
+ value={count}
738
+ />
739
+ <IconButton name="add" onClick={() => setCount((c) => c + 1)} />
740
+ </HStack>
741
+ </VStack>
742
+ );
743
+ }
744
+ ```
745
+
746
+ #### Countdown
747
+
748
+ ```tsx live
749
+ function CountDownExample() {
750
+ const pad = (n: number) => String(n).padStart(2, '0');
751
+ const totalSeconds = 5 * 60;
752
+ const [seconds, setSeconds] = React.useState(totalSeconds);
753
+ const [running, setRunning] = React.useState(false);
754
+
755
+ React.useEffect(() => {
756
+ if (!running) return;
757
+ const id = setInterval(() => {
758
+ setSeconds((prev) => {
759
+ if (prev <= 1) {
760
+ clearInterval(id);
761
+ return 0;
762
+ }
763
+ return prev - 1;
764
+ });
765
+ }, 1000);
766
+ return () => clearInterval(id);
767
+ }, [running]);
768
+
769
+ const minutes = Math.floor(seconds / 60);
770
+ const secs = seconds % 60;
771
+ const formatted = `${pad(minutes)}:${pad(secs)}`;
772
+
773
+ const onReset = () => setSeconds(totalSeconds);
774
+ const progress = Math.max(0, Math.min(1, (totalSeconds - seconds) / totalSeconds));
775
+
776
+ return (
777
+ <VStack gap={1}>
778
+ <RollingNumber font="display3" formattedValue={formatted} value={seconds} ariaLive="off" />
779
+ <HStack gap={2}>
780
+ <Button onClick={() => setRunning((r) => !r)}>{running ? 'Pause' : 'Start'}</Button>
781
+ <Button onClick={onReset}>Reset</Button>
782
+ </HStack>
783
+
784
+ <Text font="label1">Countdown with percent</Text>
785
+ <VStack gap={1}>
786
+ <ProgressBar progress={progress} />
787
+ <RollingNumber
788
+ font="body"
789
+ format={{ style: 'percent', maximumFractionDigits: 0 }}
790
+ prefix="Elapsed: "
791
+ value={progress}
792
+ ariaLive="off"
793
+ />
794
+ </VStack>
795
+ </VStack>
796
+ );
797
+ }
798
+ ```
799
+
800
+ #### Live Auction
801
+
802
+ ```tsx live
803
+ function LiveBiddingExample() {
804
+ const [currentBid, setCurrentBid] = useState(45000);
805
+ const [bidCount, setBidCount] = useState(23);
806
+ const [timeLeft, setTimeLeft] = useState(180);
807
+
808
+ React.useEffect(() => {
809
+ const timer = setInterval(() => {
810
+ setTimeLeft((t) => Math.max(0, t - 1));
811
+ }, 1000);
812
+ return () => clearInterval(timer);
813
+ }, []);
814
+
815
+ const placeBid = (increment: number) => {
816
+ setCurrentBid((b) => b + increment);
817
+ setBidCount((c) => c + 1);
818
+ };
819
+
820
+ const minutes = Math.floor(timeLeft / 60);
821
+ const seconds = timeLeft % 60;
822
+
823
+ return (
824
+ <VStack gap={2}>
825
+ <VStack gap={1}>
826
+ <Text color="fgMuted" font="caption">
827
+ Current Bid
828
+ </Text>
829
+ <RollingNumber
830
+ colorPulseOnUpdate
831
+ font="display2"
832
+ format={{ style: 'currency', currency: 'USD', minimumFractionDigits: 0 }}
833
+ positivePulseColor="accentBoldRed"
834
+ transition={{
835
+ y: { type: 'spring', stiffness: 200, damping: 20 },
836
+ }}
837
+ value={currentBid}
838
+ />
839
+ <HStack gap={1}>
840
+ <RollingNumber font="body" format={{ minimumFractionDigits: 0 }} value={bidCount} />
841
+ <Text font="body">bids placed</Text>
842
+ <Text color="fgMuted" font="body">
843
+
844
+ </Text>
845
+ <RollingNumber
846
+ color={timeLeft < 30 ? 'fgNegative' : 'fg'}
847
+ font="body"
848
+ formattedValue={`${minutes}:${String(seconds).padStart(2, '0')}`}
849
+ value={timeLeft}
850
+ ariaLive="off"
851
+ />
852
+ <Text font="body">remaining</Text>
853
+ </HStack>
854
+ </VStack>
855
+ <HStack gap={1}>
856
+ <Button onClick={() => placeBid(100)}>+$100</Button>
857
+ <Button onClick={() => placeBid(500)}>+$500</Button>
858
+ <Button onClick={() => placeBid(1000)}>+$1000</Button>
859
+ </HStack>
860
+ </VStack>
861
+ );
862
+ }
863
+ ```
864
+
865
+ #### Social Media Statistics
866
+
867
+ ```tsx live
868
+ function StatisticsExample() {
869
+ const [views, setViews] = useState(1234567);
870
+ const [likes, setLikes] = useState(89432);
871
+ const [shares, setShares] = useState(12789);
872
+ const [downloads, setDownloads] = useState(567890);
873
+
874
+ const simulateActivity = () => {
875
+ setViews((v) => v + Math.floor(Math.random() * 1000));
876
+ setLikes((l) => l + Math.floor(Math.random() * 200));
877
+ setShares((s) => s + Math.floor(Math.random() * 100));
878
+ setDownloads((d) => d + Math.floor(Math.random() * 500));
879
+ };
880
+
881
+ return (
882
+ <VStack gap={2}>
883
+ <HStack gap={4}>
884
+ <VStack alignItems="center" gap={0.5}>
885
+ <RollingNumber
886
+ colorPulseOnUpdate
887
+ font="title1"
888
+ format={{ notation: 'compact', maximumFractionDigits: 1, minimumFractionDigits: 1 }}
889
+ positivePulseColor="accentBoldBlue"
890
+ value={views}
891
+ />
892
+ <Text color="fgMuted" font="caption">
893
+ Views
894
+ </Text>
895
+ </VStack>
896
+ <VStack alignItems="center" gap={0.5}>
897
+ <RollingNumber
898
+ colorPulseOnUpdate
899
+ font="title1"
900
+ format={{ notation: 'compact', maximumFractionDigits: 1, minimumFractionDigits: 1 }}
901
+ positivePulseColor="accentBoldRed"
902
+ prefix={<Icon color="accentBoldRed" name="heart" />}
903
+ styles={{ prefix: { paddingRight: 'var(--space-0_5)' } }}
904
+ value={likes}
905
+ />
906
+ <Text color="fgMuted" font="caption">
907
+ Likes
908
+ </Text>
909
+ </VStack>
910
+ <VStack alignItems="center" gap={0.5}>
911
+ <RollingNumber
912
+ colorPulseOnUpdate
913
+ font="title1"
914
+ format={{ notation: 'compact', maximumFractionDigits: 1, minimumFractionDigits: 1 }}
915
+ positivePulseColor="accentBoldGreen"
916
+ value={shares}
917
+ />
918
+ <Text color="fgMuted" font="caption">
919
+ Shares
920
+ </Text>
921
+ </VStack>
922
+ <VStack alignItems="center" gap={0.5}>
923
+ <RollingNumber
924
+ colorPulseOnUpdate
925
+ font="title1"
926
+ format={{ notation: 'compact', maximumFractionDigits: 1, minimumFractionDigits: 1 }}
927
+ positivePulseColor="accentBoldPurple"
928
+ value={downloads}
929
+ />
930
+ <Text color="fgMuted" font="caption">
931
+ Downloads
932
+ </Text>
933
+ </VStack>
934
+ </HStack>
935
+ <Button alignSelf="flex-start" onClick={simulateActivity}>
936
+ Simulate Activity
937
+ </Button>
938
+ </VStack>
939
+ );
940
+ }
941
+ ```
942
+
943
+ ### Anatomy & Customization
944
+
945
+ RollingNumber is composed of small, swappable subcomponents and exposes granular className/style hooks for each section of the number. Use these to customize structure and styling or to plug in your own components.
946
+
947
+ #### Subcomponents
948
+
949
+ - **RollingNumberMaskComponent**: Component used to mask the animated digit content.
950
+ - **RollingNumberAffixSectionComponent**: Component used to render ReactNode `prefix` / `suffix` props.
951
+ - **RollingNumberValueSectionComponent**: Component used to render the four `Intl.NumberFormat` sections (`i18nPrefix`, `integer`, `fraction`, `i18nSuffix`).
952
+ - **RollingNumberDigitComponent**: Component used to render the per-digit roll animation.
953
+ - **RollingNumberSymbolComponent**: Component used to render non-digit symbols (group separators, decimal, literals, etc.).
954
+
955
+ You can replace any of these with your own components via props:
956
+
957
+ ```tsx
958
+ <RollingNumber
959
+ RollingNumberMaskComponent={MyMask}
960
+ RollingNumberAffixSectionComponent={MyAffixSection}
961
+ RollingNumberValueSectionComponent={MyValueSection}
962
+ RollingNumberDigitComponent={MyDigit}
963
+ RollingNumberSymbolComponent={MySymbol}
964
+ value={1234.56}
965
+ format={{ style: 'currency', currency: 'USD' }}
966
+ />
967
+ ```
968
+
969
+ #### Class name overrides
970
+
971
+ Use `classNames` to target specific parts for CSS styling (Linaria or your own classes):
972
+
973
+ - **root**: Outer container (`Text` root)
974
+ - **visibleContent**: Motion-wrapped span containing the visible number (color animation lives here)
975
+ - **formattedValueSection**: Container around the four i18n sections
976
+ - **i18nPrefix**: Section generated by `Intl.NumberFormat` before the number
977
+ - **integer**: Integer part of the number
978
+ - **fraction**: Fractional part of the number
979
+ - **i18nSuffix**: Section generated by `Intl.NumberFormat` after the number
980
+ - **prefix**: Wrapper around your `prefix` prop
981
+ - **suffix**: Wrapper around your `suffix` prop
982
+ - **text**: `Text` element used for digits, separators, prefix, and suffix
983
+
984
+ #### Style overrides
985
+
986
+ Use `styles` to inline style specific parts:
987
+
988
+ - **root**, **visibleContent**, **formattedValueSection**, **i18nPrefix**, **integer**, **fraction**, **i18nSuffix**, **prefix**, **suffix**, **text**
989
+
990
+ `styles.text` applies to the shared `Text` component that renders digits, symbols, prefix, and suffix.
991
+
992
+ #### Structure diagrams
993
+
994
+ High-level anatomy of RollingNumber and its sections:
995
+
996
+ ```text
997
+ RollingNumber (root: Text)
998
+ ├── screenReaderOnly <span aria-live> (hidden a11y text)
999
+ └── <m.span> (visibleContent)
1000
+ ├── AffixSection (prefix) ← your ReactNode prefix
1001
+ ├── HStack (formattedValueSection)
1002
+ │ ├── ValueSection (i18nPrefix)
1003
+ │ ├── ValueSection (integer)
1004
+ │ ├── ValueSection (fraction)
1005
+ │ └── ValueSection (i18nSuffix)
1006
+ └── AffixSection (suffix) ← your ReactNode suffix
1007
+ ```
1008
+
1009
+ Per-digit rendering inside a ValueSection:
1010
+
1011
+ ```text
1012
+ ValueSection
1013
+ ├── Symbol(s) (e.g., currency, group, decimal)
1014
+ └── Digit(s)
1015
+ └── Mask
1016
+ └── DigitContainer (animated)
1017
+ ├── non-active digits above (positioned)
1018
+ ├── active digit (centered)
1019
+ └── non-active digits below (positioned)
1020
+ ```
1021
+
1022
+