@coinbase/cds-mcp-server 8.17.3 → 8.17.4

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 (284) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/mcp-docs/mobile/components/Accordion.txt +11 -12
  3. package/mcp-docs/mobile/components/AccordionItem.txt +5 -6
  4. package/mcp-docs/mobile/components/Alert.txt +21 -22
  5. package/mcp-docs/mobile/components/AreaChart.txt +118 -119
  6. package/mcp-docs/mobile/components/Avatar.txt +82 -83
  7. package/mcp-docs/mobile/components/AvatarButton.txt +103 -104
  8. package/mcp-docs/mobile/components/Banner.txt +100 -101
  9. package/mcp-docs/mobile/components/BarChart.txt +120 -121
  10. package/mcp-docs/mobile/components/Box.txt +65 -66
  11. package/mcp-docs/mobile/components/BrowserBar.txt +38 -39
  12. package/mcp-docs/mobile/components/Button.txt +78 -79
  13. package/mcp-docs/mobile/components/ButtonGroup.txt +10 -11
  14. package/mcp-docs/mobile/components/Carousel.txt +103 -104
  15. package/mcp-docs/mobile/components/CartesianChart.txt +107 -108
  16. package/mcp-docs/mobile/components/CellMedia.txt +15 -16
  17. package/mcp-docs/mobile/components/Checkbox.txt +35 -36
  18. package/mcp-docs/mobile/components/CheckboxCell.txt +73 -74
  19. package/mcp-docs/mobile/components/CheckboxGroup.txt +24 -25
  20. package/mcp-docs/mobile/components/Chip.txt +67 -68
  21. package/mcp-docs/mobile/components/Coachmark.txt +42 -43
  22. package/mcp-docs/mobile/components/Collapsible.txt +15 -16
  23. package/mcp-docs/mobile/components/ContainedAssetCard.txt +16 -17
  24. package/mcp-docs/mobile/components/ContentCard.txt +99 -100
  25. package/mcp-docs/mobile/components/ContentCardBody.txt +23 -24
  26. package/mcp-docs/mobile/components/ContentCardFooter.txt +19 -20
  27. package/mcp-docs/mobile/components/ContentCardHeader.txt +33 -34
  28. package/mcp-docs/mobile/components/ContentCell.txt +102 -103
  29. package/mcp-docs/mobile/components/ControlGroup.txt +106 -107
  30. package/mcp-docs/mobile/components/DatePicker.txt +121 -122
  31. package/mcp-docs/mobile/components/Divider.txt +31 -32
  32. package/mcp-docs/mobile/components/DotCount.txt +15 -16
  33. package/mcp-docs/mobile/components/DotStatusColor.txt +12 -13
  34. package/mcp-docs/mobile/components/DotSymbol.txt +21 -22
  35. package/mcp-docs/mobile/components/Fallback.txt +49 -50
  36. package/mcp-docs/mobile/components/FloatingAssetCard.txt +13 -14
  37. package/mcp-docs/mobile/components/HStack.txt +99 -100
  38. package/mcp-docs/mobile/components/HeroSquare.txt +11 -12
  39. package/mcp-docs/mobile/components/Icon.txt +16 -17
  40. package/mcp-docs/mobile/components/IconButton.txt +104 -105
  41. package/mcp-docs/mobile/components/InputChip.txt +62 -63
  42. package/mcp-docs/mobile/components/Interactable.txt +72 -73
  43. package/mcp-docs/mobile/components/LineChart.txt +117 -118
  44. package/mcp-docs/mobile/components/Link.txt +113 -114
  45. package/mcp-docs/mobile/components/ListCell.txt +149 -128
  46. package/mcp-docs/mobile/components/LogoMark.txt +8 -9
  47. package/mcp-docs/mobile/components/LogoWordMark.txt +7 -8
  48. package/mcp-docs/mobile/components/Lottie.txt +39 -40
  49. package/mcp-docs/mobile/components/LottieStatusAnimation.txt +11 -12
  50. package/mcp-docs/mobile/components/Modal.txt +36 -37
  51. package/mcp-docs/mobile/components/ModalBody.txt +5 -6
  52. package/mcp-docs/mobile/components/ModalFooter.txt +5 -6
  53. package/mcp-docs/mobile/components/ModalHeader.txt +5 -6
  54. package/mcp-docs/mobile/components/MultiContentModule.txt +107 -108
  55. package/mcp-docs/mobile/components/NavigationTitle.txt +13 -14
  56. package/mcp-docs/mobile/components/NavigationTitleSelect.txt +20 -21
  57. package/mcp-docs/mobile/components/NudgeCard.txt +20 -21
  58. package/mcp-docs/mobile/components/Numpad.txt +108 -109
  59. package/mcp-docs/mobile/components/Overlay.txt +45 -46
  60. package/mcp-docs/mobile/components/PageFooter.txt +57 -58
  61. package/mcp-docs/mobile/components/PageHeader.txt +79 -80
  62. package/mcp-docs/mobile/components/PeriodSelector.txt +98 -99
  63. package/mcp-docs/mobile/components/Pictogram.txt +11 -12
  64. package/mcp-docs/mobile/components/Point.txt +21 -22
  65. package/mcp-docs/mobile/components/PortalProvider.txt +7 -8
  66. package/mcp-docs/mobile/components/Pressable.txt +67 -68
  67. package/mcp-docs/mobile/components/ProgressBar.txt +18 -19
  68. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +13 -14
  69. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +13 -14
  70. package/mcp-docs/mobile/components/ProgressCircle.txt +22 -23
  71. package/mcp-docs/mobile/components/Radio.txt +35 -36
  72. package/mcp-docs/mobile/components/RadioCell.txt +73 -74
  73. package/mcp-docs/mobile/components/RadioGroup.txt +35 -36
  74. package/mcp-docs/mobile/components/ReferenceLine.txt +15 -16
  75. package/mcp-docs/mobile/components/RemoteImage.txt +47 -48
  76. package/mcp-docs/mobile/components/RemoteImageGroup.txt +11 -12
  77. package/mcp-docs/mobile/components/RollingNumber.txt +130 -131
  78. package/mcp-docs/mobile/components/Scrubber.txt +19 -20
  79. package/mcp-docs/mobile/components/SearchInput.txt +77 -78
  80. package/mcp-docs/mobile/components/SectionHeader.txt +16 -17
  81. package/mcp-docs/mobile/components/SegmentedTabs.txt +105 -106
  82. package/mcp-docs/mobile/components/Select.txt +35 -36
  83. package/mcp-docs/mobile/components/SelectChip.txt +143 -144
  84. package/mcp-docs/mobile/components/SelectOption.txt +26 -27
  85. package/mcp-docs/mobile/components/SlideButton.txt +128 -129
  86. package/mcp-docs/mobile/components/Spacer.txt +27 -28
  87. package/mcp-docs/mobile/components/Sparkline.txt +18 -19
  88. package/mcp-docs/mobile/components/SparklineGradient.txt +18 -19
  89. package/mcp-docs/mobile/components/SparklineInteractive.txt +37 -38
  90. package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +12 -13
  91. package/mcp-docs/mobile/components/Spinner.txt +15 -16
  92. package/mcp-docs/mobile/components/SpotIcon.txt +11 -12
  93. package/mcp-docs/mobile/components/SpotRectangle.txt +11 -12
  94. package/mcp-docs/mobile/components/SpotSquare.txt +11 -12
  95. package/mcp-docs/mobile/components/Stepper.txt +113 -114
  96. package/mcp-docs/mobile/components/SubBrandLogoMark.txt +8 -9
  97. package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +8 -9
  98. package/mcp-docs/mobile/components/Switch.txt +35 -36
  99. package/mcp-docs/mobile/components/TabIndicator.txt +12 -13
  100. package/mcp-docs/mobile/components/TabLabel.txt +28 -29
  101. package/mcp-docs/mobile/components/TabNavigation.txt +41 -42
  102. package/mcp-docs/mobile/components/TabbedChips.txt +38 -39
  103. package/mcp-docs/mobile/components/Tabs.txt +76 -77
  104. package/mcp-docs/mobile/components/Tag.txt +102 -103
  105. package/mcp-docs/mobile/components/Text.txt +91 -92
  106. package/mcp-docs/mobile/components/TextInput.txt +107 -108
  107. package/mcp-docs/mobile/components/ThemeProvider.txt +8 -9
  108. package/mcp-docs/mobile/components/Toast.txt +82 -83
  109. package/mcp-docs/mobile/components/Tooltip.txt +20 -21
  110. package/mcp-docs/mobile/components/TopNavBar.txt +55 -56
  111. package/mcp-docs/mobile/components/Tour.txt +18 -19
  112. package/mcp-docs/mobile/components/Tray.txt +43 -44
  113. package/mcp-docs/mobile/components/UpsellCard.txt +16 -17
  114. package/mcp-docs/mobile/components/VStack.txt +99 -100
  115. package/mcp-docs/mobile/components/XAxis.txt +25 -26
  116. package/mcp-docs/mobile/components/YAxis.txt +26 -27
  117. package/mcp-docs/mobile/getting-started/{mcp-server.txt → ai-overview.txt} +51 -37
  118. package/mcp-docs/mobile/getting-started/installation.txt +57 -0
  119. package/mcp-docs/mobile/getting-started/introduction.txt +3 -0
  120. package/mcp-docs/mobile/getting-started/playground.txt +3 -0
  121. package/mcp-docs/mobile/getting-started/styling.txt +84 -0
  122. package/mcp-docs/mobile/getting-started/theming.txt +286 -0
  123. package/mcp-docs/mobile/hooks/useDimensions.txt +27 -2
  124. package/mcp-docs/mobile/hooks/useEventHandler.txt +120 -0
  125. package/mcp-docs/mobile/hooks/useMergeRefs.txt +116 -0
  126. package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +67 -2
  127. package/mcp-docs/mobile/hooks/usePreviousValue.txt +74 -0
  128. package/mcp-docs/mobile/hooks/useRefMap.txt +178 -0
  129. package/mcp-docs/mobile/hooks/useTheme.txt +213 -2
  130. package/mcp-docs/mobile/routes.txt +8 -1
  131. package/mcp-docs/web/components/Accordion.txt +12 -13
  132. package/mcp-docs/web/components/AccordionItem.txt +5 -6
  133. package/mcp-docs/web/components/Alert.txt +24 -25
  134. package/mcp-docs/web/components/AreaChart.txt +137 -138
  135. package/mcp-docs/web/components/Avatar.txt +91 -92
  136. package/mcp-docs/web/components/AvatarButton.txt +113 -114
  137. package/mcp-docs/web/components/Banner.txt +101 -102
  138. package/mcp-docs/web/components/BarChart.txt +367 -368
  139. package/mcp-docs/web/components/Box.txt +65 -66
  140. package/mcp-docs/web/components/Button.txt +81 -82
  141. package/mcp-docs/web/components/ButtonGroup.txt +10 -11
  142. package/mcp-docs/web/components/Calendar.txt +56 -57
  143. package/mcp-docs/web/components/Carousel.txt +116 -117
  144. package/mcp-docs/web/components/CartesianChart.txt +357 -358
  145. package/mcp-docs/web/components/CellMedia.txt +14 -15
  146. package/mcp-docs/web/components/Checkbox.txt +22 -23
  147. package/mcp-docs/web/components/CheckboxCell.txt +70 -71
  148. package/mcp-docs/web/components/CheckboxGroup.txt +15 -16
  149. package/mcp-docs/web/components/Chip.txt +67 -68
  150. package/mcp-docs/web/components/Coachmark.txt +69 -70
  151. package/mcp-docs/web/components/Collapsible.txt +15 -16
  152. package/mcp-docs/web/components/ContainedAssetCard.txt +108 -109
  153. package/mcp-docs/web/components/ContentCard.txt +101 -102
  154. package/mcp-docs/web/components/ContentCardBody.txt +23 -24
  155. package/mcp-docs/web/components/ContentCardFooter.txt +19 -20
  156. package/mcp-docs/web/components/ContentCardHeader.txt +33 -34
  157. package/mcp-docs/web/components/ContentCell.txt +85 -86
  158. package/mcp-docs/web/components/ControlGroup.txt +108 -109
  159. package/mcp-docs/web/components/DatePicker.txt +59 -60
  160. package/mcp-docs/web/components/Divider.txt +31 -32
  161. package/mcp-docs/web/components/DotCount.txt +17 -18
  162. package/mcp-docs/web/components/DotStatusColor.txt +12 -13
  163. package/mcp-docs/web/components/DotSymbol.txt +24 -25
  164. package/mcp-docs/web/components/Dropdown.txt +31 -32
  165. package/mcp-docs/web/components/Fallback.txt +49 -50
  166. package/mcp-docs/web/components/FloatingAssetCard.txt +108 -109
  167. package/mcp-docs/web/components/FullscreenAlert.txt +20 -21
  168. package/mcp-docs/web/components/FullscreenModal.txt +28 -29
  169. package/mcp-docs/web/components/FullscreenModalLayout.txt +19 -20
  170. package/mcp-docs/web/components/Grid.txt +106 -107
  171. package/mcp-docs/web/components/GridColumn.txt +96 -97
  172. package/mcp-docs/web/components/HStack.txt +101 -102
  173. package/mcp-docs/web/components/HeroSquare.txt +12 -13
  174. package/mcp-docs/web/components/Icon.txt +27 -28
  175. package/mcp-docs/web/components/IconButton.txt +117 -118
  176. package/mcp-docs/web/components/InputChip.txt +62 -63
  177. package/mcp-docs/web/components/Interactable.txt +75 -76
  178. package/mcp-docs/web/components/LineChart.txt +366 -367
  179. package/mcp-docs/web/components/Link.txt +114 -115
  180. package/mcp-docs/web/components/ListCell.txt +157 -136
  181. package/mcp-docs/web/components/LogoMark.txt +8 -9
  182. package/mcp-docs/web/components/LogoWordMark.txt +7 -8
  183. package/mcp-docs/web/components/Lottie.txt +44 -45
  184. package/mcp-docs/web/components/LottieStatusAnimation.txt +11 -12
  185. package/mcp-docs/web/components/MediaQueryProvider.txt +7 -8
  186. package/mcp-docs/web/components/Modal.txt +69 -66
  187. package/mcp-docs/web/components/ModalBody.txt +5 -6
  188. package/mcp-docs/web/components/ModalFooter.txt +5 -6
  189. package/mcp-docs/web/components/ModalHeader.txt +5 -6
  190. package/mcp-docs/web/components/MultiContentModule.txt +109 -110
  191. package/mcp-docs/web/components/NavigationBar.txt +18 -19
  192. package/mcp-docs/web/components/NavigationTitle.txt +7 -8
  193. package/mcp-docs/web/components/NavigationTitleSelect.txt +9 -10
  194. package/mcp-docs/web/components/NudgeCard.txt +61 -62
  195. package/mcp-docs/web/components/Overlay.txt +57 -58
  196. package/mcp-docs/web/components/PageFooter.txt +77 -78
  197. package/mcp-docs/web/components/PageHeader.txt +107 -108
  198. package/mcp-docs/web/components/Pagination.txt +115 -116
  199. package/mcp-docs/web/components/PeriodSelector.txt +158 -159
  200. package/mcp-docs/web/components/Pictogram.txt +13 -14
  201. package/mcp-docs/web/components/Point.txt +169 -170
  202. package/mcp-docs/web/components/PortalProvider.txt +6 -7
  203. package/mcp-docs/web/components/Pressable.txt +73 -74
  204. package/mcp-docs/web/components/ProgressBar.txt +20 -21
  205. package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +15 -16
  206. package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +15 -16
  207. package/mcp-docs/web/components/ProgressCircle.txt +24 -25
  208. package/mcp-docs/web/components/Radio.txt +22 -23
  209. package/mcp-docs/web/components/RadioCell.txt +83 -84
  210. package/mcp-docs/web/components/RadioGroup.txt +22 -23
  211. package/mcp-docs/web/components/ReferenceLine.txt +22 -23
  212. package/mcp-docs/web/components/RemoteImage.txt +49 -50
  213. package/mcp-docs/web/components/RemoteImageGroup.txt +11 -12
  214. package/mcp-docs/web/components/RollingNumber.txt +131 -132
  215. package/mcp-docs/web/components/Scrubber.txt +22 -23
  216. package/mcp-docs/web/components/SearchInput.txt +29 -30
  217. package/mcp-docs/web/components/SectionHeader.txt +98 -99
  218. package/mcp-docs/web/components/SegmentedTabs.txt +109 -110
  219. package/mcp-docs/web/components/Select.txt +22 -23
  220. package/mcp-docs/web/components/SelectChip.txt +134 -135
  221. package/mcp-docs/web/components/SelectOption.txt +31 -32
  222. package/mcp-docs/web/components/Sidebar.txt +109 -110
  223. package/mcp-docs/web/components/SidebarItem.txt +6 -7
  224. package/mcp-docs/web/components/SidebarMoreMenu.txt +5 -6
  225. package/mcp-docs/web/components/Spacer.txt +57 -58
  226. package/mcp-docs/web/components/Sparkline.txt +18 -19
  227. package/mcp-docs/web/components/SparklineGradient.txt +18 -19
  228. package/mcp-docs/web/components/SparklineInteractive.txt +34 -35
  229. package/mcp-docs/web/components/SparklineInteractiveHeader.txt +12 -13
  230. package/mcp-docs/web/components/Spinner.txt +15 -16
  231. package/mcp-docs/web/components/SpotIcon.txt +12 -13
  232. package/mcp-docs/web/components/SpotRectangle.txt +12 -13
  233. package/mcp-docs/web/components/SpotSquare.txt +12 -13
  234. package/mcp-docs/web/components/Stepper.txt +119 -120
  235. package/mcp-docs/web/components/SubBrandLogoMark.txt +8 -9
  236. package/mcp-docs/web/components/SubBrandLogoWordMark.txt +8 -9
  237. package/mcp-docs/web/components/Switch.txt +23 -24
  238. package/mcp-docs/web/components/TabIndicator.txt +12 -13
  239. package/mcp-docs/web/components/TabLabel.txt +28 -29
  240. package/mcp-docs/web/components/TabNavigation.txt +41 -42
  241. package/mcp-docs/web/components/TabbedChips.txt +38 -39
  242. package/mcp-docs/web/components/Table.txt +17 -18
  243. package/mcp-docs/web/components/TableBody.txt +9 -10
  244. package/mcp-docs/web/components/TableCaption.txt +13 -14
  245. package/mcp-docs/web/components/TableCell.txt +21 -22
  246. package/mcp-docs/web/components/TableCellFallback.txt +16 -17
  247. package/mcp-docs/web/components/TableFooter.txt +9 -10
  248. package/mcp-docs/web/components/TableHeader.txt +10 -11
  249. package/mcp-docs/web/components/TableRow.txt +13 -14
  250. package/mcp-docs/web/components/Tabs.txt +94 -95
  251. package/mcp-docs/web/components/Tag.txt +106 -107
  252. package/mcp-docs/web/components/Text.txt +110 -111
  253. package/mcp-docs/web/components/TextInput.txt +32 -33
  254. package/mcp-docs/web/components/ThemeProvider.txt +27 -28
  255. package/mcp-docs/web/components/TileButton.txt +37 -38
  256. package/mcp-docs/web/components/Toast.txt +82 -83
  257. package/mcp-docs/web/components/Tooltip.txt +22 -23
  258. package/mcp-docs/web/components/Tour.txt +21 -22
  259. package/mcp-docs/web/components/Tray.txt +23 -24
  260. package/mcp-docs/web/components/UpsellCard.txt +16 -17
  261. package/mcp-docs/web/components/VStack.txt +101 -102
  262. package/mcp-docs/web/components/XAxis.txt +25 -26
  263. package/mcp-docs/web/components/YAxis.txt +26 -27
  264. package/mcp-docs/web/getting-started/{mcp-server.txt → ai-overview.txt} +51 -37
  265. package/mcp-docs/web/getting-started/installation.txt +103 -0
  266. package/mcp-docs/web/getting-started/introduction.txt +3 -0
  267. package/mcp-docs/web/getting-started/playground.txt +3 -0
  268. package/mcp-docs/web/getting-started/styling.txt +161 -0
  269. package/mcp-docs/web/getting-started/templates.txt +121 -0
  270. package/mcp-docs/web/getting-started/theming.txt +426 -0
  271. package/mcp-docs/web/hooks/useBreakpoints.txt +30 -2
  272. package/mcp-docs/web/hooks/useDimensions.txt +61 -2
  273. package/mcp-docs/web/hooks/useEventHandler.txt +120 -0
  274. package/mcp-docs/web/hooks/useHasMounted.txt +22 -2
  275. package/mcp-docs/web/hooks/useIsoEffect.txt +18 -2
  276. package/mcp-docs/web/hooks/useMediaQuery.txt +22 -2
  277. package/mcp-docs/web/hooks/useMergeRefs.txt +116 -0
  278. package/mcp-docs/web/hooks/useOverlayContentContext.txt +64 -2
  279. package/mcp-docs/web/hooks/usePreviousValue.txt +74 -0
  280. package/mcp-docs/web/hooks/useRefMap.txt +178 -0
  281. package/mcp-docs/web/hooks/useScrollBlocker.txt +21 -2
  282. package/mcp-docs/web/hooks/useTheme.txt +261 -2
  283. package/mcp-docs/web/routes.txt +9 -1
  284. package/package.json +1 -1
@@ -4,138 +4,10 @@ A button that slides to confirm an action.
4
4
 
5
5
  ## Import
6
6
 
7
- ```jsx
7
+ ```tsx
8
8
  import { SlideButton } from '@coinbase/cds-mobile/buttons/SlideButton'
9
9
  ```
10
10
 
11
- ## Props
12
-
13
- | Prop | Type | Required | Default | Description |
14
- | --- | --- | --- | --- | --- |
15
- | `checked` | `boolean` | Yes | `-` | Control whether the button is in a checked state. |
16
- | `SlideButtonBackgroundComponent` | `SlideButtonBackgroundComponent` | No | `DefaultSlideButtonBackground` | Custom component to render as the container behind the sliding handle. |
17
- | `SlideButtonHandleComponent` | `SlideButtonHandleComponent` | No | `DefaultSlideButtonHandle` | Custom component to render as the sliding handle. |
18
- | `alignContent` | `flex-start \| flex-end \| center \| stretch \| space-between \| space-around \| space-evenly` | No | `-` | - |
19
- | `alignItems` | `flex-start \| flex-end \| center \| stretch \| baseline` | No | `-` | - |
20
- | `alignSelf` | `auto \| FlexAlignType` | No | `-` | - |
21
- | `aspectRatio` | `string \| number` | No | `-` | - |
22
- | `autoCompleteSlideOnThresholdMet` | `boolean` | No | `-` | If true, the slide button will automatically complete the slide when the threshold is met. If false, the user must release to complete the action. |
23
- | `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 | `-` | Background color of the overlay (element being interacted with). |
24
- | `blendStyles` | `{ background?: string; pressedBackground?: string \| undefined; disabledBackground?: string \| undefined; borderColor?: string \| undefined; pressedBorderColor?: string \| undefined; disabledBorderColor?: string \| undefined; } \| undefined` | No | `-` | Custom color overrides for different interaction states. Base colors (background, borderColor) are used directly, while interaction state colors (pressed, disabled) are used as alternative base colors for blending calculations with blend strength and color scheme considerations. |
25
- | `block` | `boolean` | No | `-` | Set element to block and expand to 100% width. |
26
- | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
27
- | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
28
- | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
29
- | `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 | `-` | - |
30
- | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
31
- | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
32
- | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
33
- | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
34
- | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
35
- | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
36
- | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
37
- | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
38
- | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
39
- | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
40
- | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
41
- | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
42
- | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
43
- | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
44
- | `bottom` | `string \| number` | No | `-` | - |
45
- | `checkThreshold` | `number` | No | `0.7` | Threshold (as a percentage from 0 to 1) at which a slide gesture will complete. A value of 0.7 means the user must slide 70% of the way across to trigger completion. |
46
- | `checkedLabel` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Label or content shown when button is in checked state. |
47
- | `children` | `((string \| number \| boolean \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal) & (string \| number \| boolean \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal \| ((state: PressableStateCallbackType) => ReactNode))) \| null` | No | `-` | Either children or a render prop that receives a boolean reflecting whether the component is currently pressed. |
48
- | `color` | `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 | `-` | - |
49
- | `columnGap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
50
- | `contentStyle` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>>` | No | `-` | Apply animated styles to the inner container. |
51
- | `dangerouslySetBackground` | `string` | No | `-` | - |
52
- | `debounceTime` | `number` | No | `500` | The amount of time to wait (in milliseconds) before invoking the debounced function. This prop is used in conjunction with the disableDebounce prop. The debounce function is configured to be invoked as soon as its called, but subsequent calls within the debounceTime period will be ignored. |
53
- | `disableDebounce` | `boolean` | No | `-` | React Native is historically trash at debouncing touch events. This can cause a lot of unwanted behavior such as double navigations where we push a screen onto the stack 2 times. Debouncing the event 500 miliseconds, but taking the leading event prevents this effect and the accidental double-tap. |
54
- | `disabled` | `boolean` | No | `-` | Is the element currently disabled. Whether the press behavior is disabled. Disables user interaction with the slide button. When true, prevents gesture events from firing. |
55
- | `display` | `flex \| none` | No | `-` | - |
56
- | `elevation` | `0 \| 1 \| 2` | No | `-` | Determines box shadow styles. Parent should have overflow set to visible to ensure styles are not clipped. Is the element elevated. |
57
- | `endCheckedNode` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Custom end node to render for the checked state of the handle, to replace the default loading indicator. |
58
- | `feedback` | `none \| light \| normal \| heavy` | No | `none` | Haptic feedback to trigger when being pressed. |
59
- | `flexBasis` | `string \| number` | No | `-` | - |
60
- | `flexDirection` | `row \| column \| row-reverse \| column-reverse` | No | `-` | - |
61
- | `flexGrow` | `number` | No | `-` | - |
62
- | `flexShrink` | `number` | No | `-` | - |
63
- | `flexWrap` | `wrap \| nowrap \| wrap-reverse` | No | `-` | - |
64
- | `font` | `inherit \| FontFamily` | No | `-` | - |
65
- | `fontFamily` | `inherit \| FontFamily` | No | `-` | - |
66
- | `fontSize` | `inherit \| FontSize` | No | `-` | - |
67
- | `fontWeight` | `inherit \| FontWeight` | No | `-` | - |
68
- | `gap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
69
- | `height` | `number` | No | `-` | Height of the entire button component (background and handle). If you pass a custom SlideButtonBackgroundComponent or SlideButtonHandleComponent, this property will be applied to both. |
70
- | `justifyContent` | `flex-start \| flex-end \| center \| space-between \| space-around \| space-evenly` | No | `-` | - |
71
- | `key` | `Key \| null` | No | `-` | - |
72
- | `left` | `string \| number` | No | `-` | - |
73
- | `lineHeight` | `inherit \| LineHeight` | No | `-` | - |
74
- | `margin` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
75
- | `marginBottom` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
76
- | `marginEnd` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
77
- | `marginStart` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
78
- | `marginTop` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
79
- | `marginX` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
80
- | `marginY` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
81
- | `maxHeight` | `string \| number` | No | `-` | - |
82
- | `maxWidth` | `string \| number` | No | `-` | - |
83
- | `minHeight` | `string \| number` | No | `-` | - |
84
- | `minWidth` | `string \| number` | No | `-` | - |
85
- | `noScaleOnPress` | `boolean` | No | `-` | Dont scale element on press. |
86
- | `onChange` | `((checked: boolean) => void)` | No | `-` | Callback function fired when slide button state changes. Will always be called after onSlideComplete and before onSlideEnd. |
87
- | `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
88
- | `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
89
- | `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
90
- | `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
91
- | `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
92
- | `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
93
- | `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
94
- | `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
95
- | `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
96
- | `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
97
- | `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
98
- | `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
99
- | `onPress` | `((event: GestureResponderEvent) => void) \| null` | No | `-` | Called when a single tap gesture is detected. |
100
- | `onPressIn` | `(((event: GestureResponderEvent) => void) & ((event: GestureResponderEvent) => void))` | No | `-` | Callback fired before onPress when button is pressed. Called when a touch is engaged before onPress. |
101
- | `onPressOut` | `(((event: GestureResponderEvent) => void) & ((event: GestureResponderEvent) => void))` | No | `-` | Callback fired before onPress when button is released. Called when a touch is released before onPress. |
102
- | `onSlideCancel` | `(() => void)` | No | `-` | Callback function fired when the slide gesture is cancelled. This occurs when a user slides less than the threshold required to complete the action. Will always be called before onSlideEnd. |
103
- | `onSlideComplete` | `(() => void)` | No | `-` | Callback function fired when the slide gesture ends successfully. This is called when the user has slid past the threshold to complete the action. Will always be called before onSlideEnd and after onChange. |
104
- | `onSlideEnd` | `(() => void)` | No | `-` | Callback function fired when the slide gesture ends. Will always be called last in the slide sequence. |
105
- | `onSlideStart` | `(() => void)` | No | `-` | Callback function fired when the slide gesture begins. |
106
- | `opacity` | `number \| AnimatedNode` | No | `-` | - |
107
- | `overflow` | `visible \| hidden \| scroll` | No | `-` | - |
108
- | `padding` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
109
- | `paddingBottom` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
110
- | `paddingEnd` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
111
- | `paddingStart` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
112
- | `paddingTop` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
113
- | `paddingX` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
114
- | `paddingY` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
115
- | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
116
- | `position` | `absolute \| relative \| static \| fixed \| sticky` | No | `-` | - |
117
- | `ref` | `((instance: View \| null) => void) \| RefObject<View> \| null` | No | `-` | - |
118
- | `right` | `string \| number` | No | `-` | - |
119
- | `rowGap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
120
- | `startUncheckedNode` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Custom start node to render for the unchecked state of the handle, to replace the default arrow icon. |
121
- | `styles` | `{ container?: StyleProp<ViewStyle>; background?: StyleProp<ViewStyle>; handle?: StyleProp<ViewStyle>; }` | No | `-` | Custom styles for the slide button. |
122
- | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Used to locate this view in end-to-end tests. |
123
- | `textAlign` | `left \| right \| auto \| center \| justify` | No | `-` | - |
124
- | `textDecorationLine` | `none \| underline \| line-through \| underline line-through` | No | `-` | - |
125
- | `textDecorationStyle` | `solid \| dotted \| dashed \| double` | No | `-` | - |
126
- | `textTransform` | `none \| capitalize \| uppercase \| lowercase` | No | `-` | - |
127
- | `top` | `string \| number` | No | `-` | - |
128
- | `transform` | `string \| (({ scaleX: AnimatableNumericValue; } & { scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ scaleY: AnimatableNumericValue; } & { scaleX?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ translateX: AnimatableNumericValue \| ${number}%; } & { scaleX?: undefined; scaleY?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ translateY: AnimatableNumericValue \| ${number}%; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ perspective: AnimatableNumericValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotate: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateX: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateY: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateZ: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ scale: AnimatableNumericValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ skewX: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ skewY: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; matrix?: undefined; }) \| ({ matrix: AnimatableNumericValue[]; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; }))[]` | No | `-` | - |
129
- | `transparentWhileInactive` | `boolean` | No | `-` | Mark the background and border as transparent until the element is interacted with (hovered, pressed, etc). Must be used in conjunction with the pressed prop |
130
- | `transparentWhilePressed` | `boolean` | No | `-` | Mark the background and border as transparent even while element is interacted with (elevation underlay issue). Must be used in conjunction with the pressed prop |
131
- | `uncheckedLabel` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Label or content shown when button is in unchecked state. |
132
- | `userSelect` | `none \| auto \| contain \| text \| all` | No | `-` | - |
133
- | `variant` | `primary \| positive \| negative` | No | `'primary'` | Toggle design and visual variants of the slide button. |
134
- | `width` | `string \| number` | No | `-` | - |
135
- | `wrapperStyles` | `{ base?: StyleProp<ViewStyle>; pressed?: StyleProp<ViewStyle>; disabled?: StyleProp<ViewStyle>; }` | No | `-` | Apply styles to the outer container. |
136
- | `zIndex` | `number` | No | `-` | - |
137
-
138
-
139
11
  ## Examples
140
12
 
141
13
  import useBaseUrl from '@docusaurus/useBaseUrl';
@@ -328,4 +200,131 @@ function Example() {
328
200
  }
329
201
  ```
330
202
 
203
+ ## Props
204
+
205
+ | Prop | Type | Required | Default | Description |
206
+ | --- | --- | --- | --- | --- |
207
+ | `checked` | `boolean` | Yes | `-` | Control whether the button is in a checked state. |
208
+ | `SlideButtonBackgroundComponent` | `SlideButtonBackgroundComponent` | No | `DefaultSlideButtonBackground` | Custom component to render as the container behind the sliding handle. |
209
+ | `SlideButtonHandleComponent` | `SlideButtonHandleComponent` | No | `DefaultSlideButtonHandle` | Custom component to render as the sliding handle. |
210
+ | `alignContent` | `flex-start \| flex-end \| center \| stretch \| space-between \| space-around \| space-evenly` | No | `-` | - |
211
+ | `alignItems` | `flex-start \| flex-end \| center \| stretch \| baseline` | No | `-` | - |
212
+ | `alignSelf` | `auto \| FlexAlignType` | No | `-` | - |
213
+ | `aspectRatio` | `string \| number` | No | `-` | - |
214
+ | `autoCompleteSlideOnThresholdMet` | `boolean` | No | `-` | If true, the slide button will automatically complete the slide when the threshold is met. If false, the user must release to complete the action. |
215
+ | `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 | `-` | Background color of the overlay (element being interacted with). |
216
+ | `blendStyles` | `{ background?: string; pressedBackground?: string \| undefined; disabledBackground?: string \| undefined; borderColor?: string \| undefined; pressedBorderColor?: string \| undefined; disabledBorderColor?: string \| undefined; } \| undefined` | No | `-` | Custom color overrides for different interaction states. Base colors (background, borderColor) are used directly, while interaction state colors (pressed, disabled) are used as alternative base colors for blending calculations with blend strength and color scheme considerations. |
217
+ | `block` | `boolean` | No | `-` | Set element to block and expand to 100% width. |
218
+ | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
219
+ | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
220
+ | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
221
+ | `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 | `-` | - |
222
+ | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
223
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
224
+ | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
225
+ | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
226
+ | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
227
+ | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
228
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
229
+ | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
230
+ | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
231
+ | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
232
+ | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
233
+ | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
234
+ | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
235
+ | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
236
+ | `bottom` | `string \| number` | No | `-` | - |
237
+ | `checkThreshold` | `number` | No | `0.7` | Threshold (as a percentage from 0 to 1) at which a slide gesture will complete. A value of 0.7 means the user must slide 70% of the way across to trigger completion. |
238
+ | `checkedLabel` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Label or content shown when button is in checked state. |
239
+ | `children` | `((string \| number \| boolean \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal) & (string \| number \| boolean \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal \| ((state: PressableStateCallbackType) => ReactNode))) \| null` | No | `-` | Either children or a render prop that receives a boolean reflecting whether the component is currently pressed. |
240
+ | `color` | `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 | `-` | - |
241
+ | `columnGap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
242
+ | `contentStyle` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>>` | No | `-` | Apply animated styles to the inner container. |
243
+ | `dangerouslySetBackground` | `string` | No | `-` | - |
244
+ | `debounceTime` | `number` | No | `500` | The amount of time to wait (in milliseconds) before invoking the debounced function. This prop is used in conjunction with the disableDebounce prop. The debounce function is configured to be invoked as soon as its called, but subsequent calls within the debounceTime period will be ignored. |
245
+ | `disableDebounce` | `boolean` | No | `-` | React Native is historically trash at debouncing touch events. This can cause a lot of unwanted behavior such as double navigations where we push a screen onto the stack 2 times. Debouncing the event 500 miliseconds, but taking the leading event prevents this effect and the accidental double-tap. |
246
+ | `disabled` | `boolean` | No | `-` | Is the element currently disabled. Whether the press behavior is disabled. Disables user interaction with the slide button. When true, prevents gesture events from firing. |
247
+ | `display` | `flex \| none` | No | `-` | - |
248
+ | `elevation` | `0 \| 1 \| 2` | No | `-` | Determines box shadow styles. Parent should have overflow set to visible to ensure styles are not clipped. Is the element elevated. |
249
+ | `endCheckedNode` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Custom end node to render for the checked state of the handle, to replace the default loading indicator. |
250
+ | `feedback` | `none \| light \| normal \| heavy` | No | `none` | Haptic feedback to trigger when being pressed. |
251
+ | `flexBasis` | `string \| number` | No | `-` | - |
252
+ | `flexDirection` | `row \| column \| row-reverse \| column-reverse` | No | `-` | - |
253
+ | `flexGrow` | `number` | No | `-` | - |
254
+ | `flexShrink` | `number` | No | `-` | - |
255
+ | `flexWrap` | `wrap \| nowrap \| wrap-reverse` | No | `-` | - |
256
+ | `font` | `inherit \| FontFamily` | No | `-` | - |
257
+ | `fontFamily` | `inherit \| FontFamily` | No | `-` | - |
258
+ | `fontSize` | `inherit \| FontSize` | No | `-` | - |
259
+ | `fontWeight` | `inherit \| FontWeight` | No | `-` | - |
260
+ | `gap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
261
+ | `height` | `number` | No | `-` | Height of the entire button component (background and handle). If you pass a custom SlideButtonBackgroundComponent or SlideButtonHandleComponent, this property will be applied to both. |
262
+ | `justifyContent` | `flex-start \| flex-end \| center \| space-between \| space-around \| space-evenly` | No | `-` | - |
263
+ | `key` | `Key \| null` | No | `-` | - |
264
+ | `left` | `string \| number` | No | `-` | - |
265
+ | `lineHeight` | `inherit \| LineHeight` | No | `-` | - |
266
+ | `margin` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
267
+ | `marginBottom` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
268
+ | `marginEnd` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
269
+ | `marginStart` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
270
+ | `marginTop` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
271
+ | `marginX` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
272
+ | `marginY` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
273
+ | `maxHeight` | `string \| number` | No | `-` | - |
274
+ | `maxWidth` | `string \| number` | No | `-` | - |
275
+ | `minHeight` | `string \| number` | No | `-` | - |
276
+ | `minWidth` | `string \| number` | No | `-` | - |
277
+ | `noScaleOnPress` | `boolean` | No | `-` | Dont scale element on press. |
278
+ | `onChange` | `((checked: boolean) => void)` | No | `-` | Callback function fired when slide button state changes. Will always be called after onSlideComplete and before onSlideEnd. |
279
+ | `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
280
+ | `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
281
+ | `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
282
+ | `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
283
+ | `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
284
+ | `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
285
+ | `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
286
+ | `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
287
+ | `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
288
+ | `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
289
+ | `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
290
+ | `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
291
+ | `onPress` | `((event: GestureResponderEvent) => void) \| null` | No | `-` | Called when a single tap gesture is detected. |
292
+ | `onPressIn` | `(((event: GestureResponderEvent) => void) & ((event: GestureResponderEvent) => void))` | No | `-` | Callback fired before onPress when button is pressed. Called when a touch is engaged before onPress. |
293
+ | `onPressOut` | `(((event: GestureResponderEvent) => void) & ((event: GestureResponderEvent) => void))` | No | `-` | Callback fired before onPress when button is released. Called when a touch is released before onPress. |
294
+ | `onSlideCancel` | `(() => void)` | No | `-` | Callback function fired when the slide gesture is cancelled. This occurs when a user slides less than the threshold required to complete the action. Will always be called before onSlideEnd. |
295
+ | `onSlideComplete` | `(() => void)` | No | `-` | Callback function fired when the slide gesture ends successfully. This is called when the user has slid past the threshold to complete the action. Will always be called before onSlideEnd and after onChange. |
296
+ | `onSlideEnd` | `(() => void)` | No | `-` | Callback function fired when the slide gesture ends. Will always be called last in the slide sequence. |
297
+ | `onSlideStart` | `(() => void)` | No | `-` | Callback function fired when the slide gesture begins. |
298
+ | `opacity` | `number \| AnimatedNode` | No | `-` | - |
299
+ | `overflow` | `visible \| hidden \| scroll` | No | `-` | - |
300
+ | `padding` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
301
+ | `paddingBottom` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
302
+ | `paddingEnd` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
303
+ | `paddingStart` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
304
+ | `paddingTop` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
305
+ | `paddingX` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
306
+ | `paddingY` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
307
+ | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
308
+ | `position` | `absolute \| relative \| static \| fixed \| sticky` | No | `-` | - |
309
+ | `ref` | `((instance: View \| null) => void) \| RefObject<View> \| null` | No | `-` | - |
310
+ | `right` | `string \| number` | No | `-` | - |
311
+ | `rowGap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
312
+ | `startUncheckedNode` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Custom start node to render for the unchecked state of the handle, to replace the default arrow icon. |
313
+ | `styles` | `{ container?: StyleProp<ViewStyle>; background?: StyleProp<ViewStyle>; handle?: StyleProp<ViewStyle>; }` | No | `-` | Custom styles for the slide button. |
314
+ | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Used to locate this view in end-to-end tests. |
315
+ | `textAlign` | `left \| right \| auto \| center \| justify` | No | `-` | - |
316
+ | `textDecorationLine` | `none \| underline \| line-through \| underline line-through` | No | `-` | - |
317
+ | `textDecorationStyle` | `solid \| dotted \| dashed \| double` | No | `-` | - |
318
+ | `textTransform` | `none \| capitalize \| uppercase \| lowercase` | No | `-` | - |
319
+ | `top` | `string \| number` | No | `-` | - |
320
+ | `transform` | `string \| (({ scaleX: AnimatableNumericValue; } & { scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ scaleY: AnimatableNumericValue; } & { scaleX?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ translateX: AnimatableNumericValue \| ${number}%; } & { scaleX?: undefined; scaleY?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ translateY: AnimatableNumericValue \| ${number}%; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ perspective: AnimatableNumericValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotate: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateX: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateY: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateZ: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ scale: AnimatableNumericValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ skewX: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ skewY: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; matrix?: undefined; }) \| ({ matrix: AnimatableNumericValue[]; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; }))[]` | No | `-` | - |
321
+ | `transparentWhileInactive` | `boolean` | No | `-` | Mark the background and border as transparent until the element is interacted with (hovered, pressed, etc). Must be used in conjunction with the pressed prop |
322
+ | `transparentWhilePressed` | `boolean` | No | `-` | Mark the background and border as transparent even while element is interacted with (elevation underlay issue). Must be used in conjunction with the pressed prop |
323
+ | `uncheckedLabel` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Label or content shown when button is in unchecked state. |
324
+ | `userSelect` | `none \| auto \| contain \| text \| all` | No | `-` | - |
325
+ | `variant` | `primary \| positive \| negative` | No | `'primary'` | Toggle design and visual variants of the slide button. |
326
+ | `width` | `string \| number` | No | `-` | - |
327
+ | `wrapperStyles` | `{ base?: StyleProp<ViewStyle>; pressed?: StyleProp<ViewStyle>; disabled?: StyleProp<ViewStyle>; }` | No | `-` | Apply styles to the outer container. |
328
+ | `zIndex` | `number` | No | `-` | - |
329
+
331
330
 
@@ -4,37 +4,10 @@ Creates space between elements.
4
4
 
5
5
  ## Import
6
6
 
7
- ```jsx
7
+ ```tsx
8
8
  import { Spacer } from '@coinbase/cds-mobile/layout/Spacer'
9
9
  ```
10
10
 
11
- ## Props
12
-
13
- | Prop | Type | Required | Default | Description |
14
- | --- | --- | --- | --- | --- |
15
- | `animated` | `boolean` | No | `-` | - |
16
- | `horizontal` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Padding in the horizontal direction |
17
- | `maxHorizontal` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Max padding in the horizontal direction |
18
- | `maxVertical` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Max padding in the vertical direction |
19
- | `minHorizontal` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Min padding in the horizontal direction |
20
- | `minVertical` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Min padding in the vertical direction |
21
- | `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
22
- | `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
23
- | `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
24
- | `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
25
- | `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
26
- | `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
27
- | `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
28
- | `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
29
- | `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
30
- | `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
31
- | `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
32
- | `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
33
- | `style` | `false \| RegisteredStyle<ViewStyle> \| Value \| AnimatedInterpolation<string \| number> \| WithAnimatedObject<ViewStyle> \| WithAnimatedArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>> \| readonly (Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>)[]> \| null` | No | `-` | - |
34
- | `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 Used to locate this view in end-to-end tests. |
35
- | `vertical` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Padding in the vertical direction |
36
-
37
-
38
11
  ## Examples
39
12
 
40
13
  ### Vertical Spacer
@@ -81,4 +54,30 @@ import { Spacer } from '@coinbase/cds-mobile/layout/Spacer'
81
54
  </HStack>
82
55
  ```
83
56
 
57
+ ## Props
58
+
59
+ | Prop | Type | Required | Default | Description |
60
+ | --- | --- | --- | --- | --- |
61
+ | `animated` | `boolean` | No | `-` | - |
62
+ | `horizontal` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Padding in the horizontal direction |
63
+ | `maxHorizontal` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Max padding in the horizontal direction |
64
+ | `maxVertical` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Max padding in the vertical direction |
65
+ | `minHorizontal` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Min padding in the horizontal direction |
66
+ | `minVertical` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Min padding in the vertical direction |
67
+ | `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
68
+ | `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
69
+ | `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
70
+ | `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
71
+ | `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
72
+ | `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
73
+ | `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
74
+ | `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
75
+ | `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
76
+ | `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
77
+ | `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
78
+ | `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
79
+ | `style` | `false \| RegisteredStyle<ViewStyle> \| Value \| AnimatedInterpolation<string \| number> \| WithAnimatedObject<ViewStyle> \| WithAnimatedArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>> \| readonly (Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>)[]> \| null` | No | `-` | - |
80
+ | `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 Used to locate this view in end-to-end tests. |
81
+ | `vertical` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Padding in the vertical direction |
82
+
84
83
 
@@ -4,28 +4,10 @@ A small line chart component for displaying data trends.
4
4
 
5
5
  ## Import
6
6
 
7
- ```jsx
7
+ ```tsx
8
8
  import { Sparkline } from '@coinbase/cds-mobile-visualization'
9
9
  ```
10
10
 
11
- ## Props
12
-
13
- | Prop | Type | Required | Default | Description |
14
- | --- | --- | --- | --- | --- |
15
- | `color` | `string` | Yes | `-` | The color of the Sparkline graphs line. Accepts any raw color value (hex, rgba, hsl, etc) or auto. Using auto dynamically selects black or white for optimal accessibility. Does not work with CDS theme color names like fgPrimary or CSS variables. |
16
- | `height` | `number` | Yes | `-` | Height of the Sparkline |
17
- | `width` | `number` | Yes | `-` | Width of the Sparkline |
18
- | `background` | `string` | No | `-` | - |
19
- | `children` | `null \| false \| ReactElement<SparklineAreaBaseProps, string \| JSXElementConstructor<any>> \| OptionalElement<SparklineAreaBaseProps>[]` | No | `-` | an optional SparklineArea that can be used to fill in the Sparkline |
20
- | `fillType` | `dotted \| gradient \| gradientDotted` | No | `'dotted'` | Type of fill to use for the area |
21
- | `key` | `Key \| null` | No | `-` | - |
22
- | `path` | `string` | No | `-` | Svg path as string. CDS offers a useSparklinePath which is useful to generate this string. This is accessible via import { useSparklinePath } from @coinbase/cds-common/visualizations/useSparklinePath;. Alternatively, you can use product tailored tooling to generate the SVG path. This component only requires a valid path string is provided. |
23
- | `ref` | `((instance: Path \| null) => void) \| RefObject<Path \| null> \| null` | No | `-` | - |
24
- | `strokeType` | `solid \| gradient` | No | `'solid'` | Type of stroke to use for the line - gradient: Gradient colored stroke line - solid: Solid colored stroke line |
25
- | `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 |
26
- | `yAxisScalingFactor` | `number` | No | `-` | Scales the sparkline to show more or less variance. Use a number less than 1 for less variance and a number greater than 1 for more variance. If you use a number greater than 1 it may clip the boundaries of the sparkline. |
27
-
28
-
29
11
  ## Examples
30
12
 
31
13
  ### Basic Example
@@ -120,4 +102,21 @@ function Example() {
120
102
  }
121
103
  ```
122
104
 
105
+ ## Props
106
+
107
+ | Prop | Type | Required | Default | Description |
108
+ | --- | --- | --- | --- | --- |
109
+ | `color` | `string` | Yes | `-` | The color of the Sparkline graphs line. Accepts any raw color value (hex, rgba, hsl, etc) or auto. Using auto dynamically selects black or white for optimal accessibility. Does not work with CDS theme color names like fgPrimary or CSS variables. |
110
+ | `height` | `number` | Yes | `-` | Height of the Sparkline |
111
+ | `width` | `number` | Yes | `-` | Width of the Sparkline |
112
+ | `background` | `string` | No | `-` | - |
113
+ | `children` | `null \| false \| ReactElement<SparklineAreaBaseProps, string \| JSXElementConstructor<any>> \| OptionalElement<SparklineAreaBaseProps>[]` | No | `-` | an optional SparklineArea that can be used to fill in the Sparkline |
114
+ | `fillType` | `dotted \| gradient \| gradientDotted` | No | `'dotted'` | Type of fill to use for the area |
115
+ | `key` | `Key \| null` | No | `-` | - |
116
+ | `path` | `string` | No | `-` | Svg path as string. CDS offers a useSparklinePath which is useful to generate this string. This is accessible via import { useSparklinePath } from @coinbase/cds-common/visualizations/useSparklinePath;. Alternatively, you can use product tailored tooling to generate the SVG path. This component only requires a valid path string is provided. |
117
+ | `ref` | `((instance: Path \| null) => void) \| RefObject<Path \| null> \| null` | No | `-` | - |
118
+ | `strokeType` | `solid \| gradient` | No | `'solid'` | Type of stroke to use for the line - gradient: Gradient colored stroke line - solid: Solid colored stroke line |
119
+ | `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 |
120
+ | `yAxisScalingFactor` | `number` | No | `-` | Scales the sparkline to show more or less variance. Use a number less than 1 for less variance and a number greater than 1 for more variance. If you use a number greater than 1 it may clip the boundaries of the sparkline. |
121
+
123
122
 
@@ -4,28 +4,10 @@ A small line chart component with gradient fill below the line.
4
4
 
5
5
  ## Import
6
6
 
7
- ```jsx
7
+ ```tsx
8
8
  import { SparklineGradient } from '@coinbase/cds-mobile-visualization'
9
9
  ```
10
10
 
11
- ## Props
12
-
13
- | Prop | Type | Required | Default | Description |
14
- | --- | --- | --- | --- | --- |
15
- | `color` | `string` | Yes | `-` | The color of the Sparkline graphs line. Accepts any raw color value (hex, rgba, hsl, etc) or auto. Using auto dynamically selects black or white for optimal accessibility. Does not work with CDS theme color names like fgPrimary or CSS variables. |
16
- | `height` | `number` | Yes | `-` | Height of the Sparkline |
17
- | `width` | `number` | Yes | `-` | Width of the Sparkline |
18
- | `background` | `string` | No | `-` | - |
19
- | `children` | `null \| false \| ReactElement<SparklineAreaBaseProps, string \| JSXElementConstructor<any>> \| OptionalElement<SparklineAreaBaseProps>[]` | No | `-` | an optional SparklineArea that can be used to fill in the Sparkline |
20
- | `fillType` | `dotted \| gradient \| gradientDotted` | No | `'dotted'` | Type of fill to use for the area |
21
- | `key` | `Key \| null` | No | `-` | - |
22
- | `path` | `string` | No | `-` | Svg path as string. CDS offers a useSparklinePath which is useful to generate this string. This is accessible via import { useSparklinePath } from @coinbase/cds-common/visualizations/useSparklinePath;. Alternatively, you can use product tailored tooling to generate the SVG path. This component only requires a valid path string is provided. |
23
- | `ref` | `((instance: Path \| null) => void) \| RefObject<Path \| null> \| null` | No | `-` | - |
24
- | `strokeType` | `solid \| gradient` | No | `'solid'` | Type of stroke to use for the line - gradient: Gradient colored stroke line - solid: Solid colored stroke line |
25
- | `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 |
26
- | `yAxisScalingFactor` | `number` | No | `-` | Scales the sparkline to show more or less variance. Use a number less than 1 for less variance and a number greater than 1 for more variance. If you use a number greater than 1 it may clip the boundaries of the sparkline. |
27
-
28
-
29
11
  ## Examples
30
12
 
31
13
  Expands upon the [Sparkline](/components/graphs/Sparkline) component to provide a gradient stroke. However, for dark mode we disable the gradient effect. These are typically used at a larger size for portfolio charts or on detail Asset pages.
@@ -104,4 +86,21 @@ function Example() {
104
86
  }
105
87
  ```
106
88
 
89
+ ## Props
90
+
91
+ | Prop | Type | Required | Default | Description |
92
+ | --- | --- | --- | --- | --- |
93
+ | `color` | `string` | Yes | `-` | The color of the Sparkline graphs line. Accepts any raw color value (hex, rgba, hsl, etc) or auto. Using auto dynamically selects black or white for optimal accessibility. Does not work with CDS theme color names like fgPrimary or CSS variables. |
94
+ | `height` | `number` | Yes | `-` | Height of the Sparkline |
95
+ | `width` | `number` | Yes | `-` | Width of the Sparkline |
96
+ | `background` | `string` | No | `-` | - |
97
+ | `children` | `null \| false \| ReactElement<SparklineAreaBaseProps, string \| JSXElementConstructor<any>> \| OptionalElement<SparklineAreaBaseProps>[]` | No | `-` | an optional SparklineArea that can be used to fill in the Sparkline |
98
+ | `fillType` | `dotted \| gradient \| gradientDotted` | No | `'dotted'` | Type of fill to use for the area |
99
+ | `key` | `Key \| null` | No | `-` | - |
100
+ | `path` | `string` | No | `-` | Svg path as string. CDS offers a useSparklinePath which is useful to generate this string. This is accessible via import { useSparklinePath } from @coinbase/cds-common/visualizations/useSparklinePath;. Alternatively, you can use product tailored tooling to generate the SVG path. This component only requires a valid path string is provided. |
101
+ | `ref` | `((instance: Path \| null) => void) \| RefObject<Path \| null> \| null` | No | `-` | - |
102
+ | `strokeType` | `solid \| gradient` | No | `'solid'` | Type of stroke to use for the line - gradient: Gradient colored stroke line - solid: Solid colored stroke line |
103
+ | `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 |
104
+ | `yAxisScalingFactor` | `number` | No | `-` | Scales the sparkline to show more or less variance. Use a number less than 1 for less variance and a number greater than 1 for more variance. If you use a number greater than 1 it may clip the boundaries of the sparkline. |
105
+
107
106
 
@@ -4,47 +4,10 @@ The SparklineInteractive is used to display a Sparkline that has multiple time p
4
4
 
5
5
  ## Import
6
6
 
7
- ```jsx
7
+ ```tsx
8
8
  import { SparklineInteractive } from '@coinbase/cds-mobile-visualization'
9
9
  ```
10
10
 
11
- ## Props
12
-
13
- | Prop | Type | Required | Default | Description |
14
- | --- | --- | --- | --- | --- |
15
- | `defaultPeriod` | `string` | Yes | `-` | default period value that the chart will use |
16
- | `formatDate` | `ChartFormatDate<Period>` | Yes | `-` | function used to format the date that is shown in the bottom of the chart as the user scrubs |
17
- | `periods` | `{ label: string; value: Period; }[]` | Yes | `-` | A list of periods that the chart will use. label is what is shown in the bottom of the chart and the value is the key. |
18
- | `strokeColor` | `string` | Yes | `-` | Color of the line* |
19
- | `allowOverflowGestures` | `boolean` | No | `-` | Allows continuous gestures on the Sparkline chart to continue outside the bounds of the chart element. |
20
- | `compact` | `boolean` | No | `false` | Show the chart in compact height |
21
- | `data` | `Record<Period, ChartData>` | No | `-` | Chart data bucketed by Period. Period is a string key |
22
- | `disableHorizontalPadding` | `boolean` | No | `-` | The chart applies horizontal padding by default which is specified by the gutter. If the chart is placed in a container with padding then you can disable horizontal padding and set the gutter to match the container padding. |
23
- | `disableScrubbing` | `boolean` | No | `false` | Disables the scrub user interaction from the chart |
24
- | `fallback` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Fallback shown in the chart when data is not available. This is usually a loading state. |
25
- | `fallbackType` | `positive \| negative` | No | `-` | If you use the default fallback then this specifies if the fallback line is decreasing or increasing |
26
- | `fill` | `boolean` | No | `true` | Adds an area fill to the Sparkline |
27
- | `fillType` | `dotted \| gradient` | No | `'gradient'` | Type of fill to use for the area |
28
- | `formatHoverDate` | `((date: Date, period: Period) => string)` | No | `-` | Formats the date above the chart as you scrub. Omit this if you dont want to show the date as the user scrubs |
29
- | `formatHoverPrice` | `((price: number) => string)` | No | `-` | Formats the price above the chart as you scrub. Omit this if you dont want to show the price as the user scrubs |
30
- | `formatMinMaxLabel` | `ChartFormatAmount` | No | `-` | function used to format the amount of money used in the minMaxLabel |
31
- | `gutter` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `3` | The amount of padding to apply to the left and right of the chart. The chart width is calculated by (screen width - 2* gutter). |
32
- | `headerNode` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds a header node above the chart. It will be placed next to the period selector on web. |
33
- | `headerTestID` | `string` | No | `-` | Test ID for the header |
34
- | `hideMinMaxLabel` | `boolean` | No | `false` | Hides the min and max label |
35
- | `hidePeriodSelector` | `boolean` | No | `false` | Hides the period selector at the bottom of the chart |
36
- | `hoverData` | `Record<Period, ChartTimeseries[]>` | No | `-` | Optional data to show on hover/scrub instead of the original sparkline. This allows multiple timeseries lines. Period => timeseries list |
37
- | `onPeriodChanged` | `((period: Period) => void)` | No | `-` | Callback when the user selects a new period. |
38
- | `onScrub` | `((params: ChartScrubParams<Period>) => void)` | No | `-` | Callback used when the user is scrubbing. This will be called for every data point change. |
39
- | `onScrubEnd` | `(() => void)` | No | `-` | Callback when a user finishes scrubbing |
40
- | `onScrubStart` | `(() => void)` | No | `-` | Callback when the user starts scrubbing |
41
- | `periodSelectorPlacement` | `above \| below` | No | `-` | Optional placement prop that position the period selector component above or below the chart |
42
- | `style` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>>` | No | `-` | Custom style for the root element. |
43
- | `styles` | `{ header?: StyleProp<ViewStyle>; root?: StyleProp<ViewStyle>; }` | No | `-` | Custom styles for the component. |
44
- | `timePeriodGutter` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Optional gutter to add to the Period selector. This is useful if you choose to use the full screen width for the chart |
45
- | `yAxisScalingFactor` | `number` | No | `-` | Scales the sparkline to show more or less variance. Use a number less than 1 for less variance and a number greater than 1 for more variance. If you use a number greater than 1 it may clip the boundaries of the sparkline. |
46
-
47
-
48
11
  ## Examples
49
12
 
50
13
  ### Default usage
@@ -154,4 +117,40 @@ You can also provide custom styles, such as to remove bottom padding from the he
154
117
  </Box>
155
118
  ```
156
119
 
120
+ ## Props
121
+
122
+ | Prop | Type | Required | Default | Description |
123
+ | --- | --- | --- | --- | --- |
124
+ | `defaultPeriod` | `string` | Yes | `-` | default period value that the chart will use |
125
+ | `formatDate` | `ChartFormatDate<Period>` | Yes | `-` | function used to format the date that is shown in the bottom of the chart as the user scrubs |
126
+ | `periods` | `{ label: string; value: Period; }[]` | Yes | `-` | A list of periods that the chart will use. label is what is shown in the bottom of the chart and the value is the key. |
127
+ | `strokeColor` | `string` | Yes | `-` | Color of the line* |
128
+ | `allowOverflowGestures` | `boolean` | No | `-` | Allows continuous gestures on the Sparkline chart to continue outside the bounds of the chart element. |
129
+ | `compact` | `boolean` | No | `false` | Show the chart in compact height |
130
+ | `data` | `Record<Period, ChartData>` | No | `-` | Chart data bucketed by Period. Period is a string key |
131
+ | `disableHorizontalPadding` | `boolean` | No | `-` | The chart applies horizontal padding by default which is specified by the gutter. If the chart is placed in a container with padding then you can disable horizontal padding and set the gutter to match the container padding. |
132
+ | `disableScrubbing` | `boolean` | No | `false` | Disables the scrub user interaction from the chart |
133
+ | `fallback` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Fallback shown in the chart when data is not available. This is usually a loading state. |
134
+ | `fallbackType` | `positive \| negative` | No | `-` | If you use the default fallback then this specifies if the fallback line is decreasing or increasing |
135
+ | `fill` | `boolean` | No | `true` | Adds an area fill to the Sparkline |
136
+ | `fillType` | `dotted \| gradient` | No | `'gradient'` | Type of fill to use for the area |
137
+ | `formatHoverDate` | `((date: Date, period: Period) => string)` | No | `-` | Formats the date above the chart as you scrub. Omit this if you dont want to show the date as the user scrubs |
138
+ | `formatHoverPrice` | `((price: number) => string)` | No | `-` | Formats the price above the chart as you scrub. Omit this if you dont want to show the price as the user scrubs |
139
+ | `formatMinMaxLabel` | `ChartFormatAmount` | No | `-` | function used to format the amount of money used in the minMaxLabel |
140
+ | `gutter` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `3` | The amount of padding to apply to the left and right of the chart. The chart width is calculated by (screen width - 2* gutter). |
141
+ | `headerNode` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds a header node above the chart. It will be placed next to the period selector on web. |
142
+ | `headerTestID` | `string` | No | `-` | Test ID for the header |
143
+ | `hideMinMaxLabel` | `boolean` | No | `false` | Hides the min and max label |
144
+ | `hidePeriodSelector` | `boolean` | No | `false` | Hides the period selector at the bottom of the chart |
145
+ | `hoverData` | `Record<Period, ChartTimeseries[]>` | No | `-` | Optional data to show on hover/scrub instead of the original sparkline. This allows multiple timeseries lines. Period => timeseries list |
146
+ | `onPeriodChanged` | `((period: Period) => void)` | No | `-` | Callback when the user selects a new period. |
147
+ | `onScrub` | `((params: ChartScrubParams<Period>) => void)` | No | `-` | Callback used when the user is scrubbing. This will be called for every data point change. |
148
+ | `onScrubEnd` | `(() => void)` | No | `-` | Callback when a user finishes scrubbing |
149
+ | `onScrubStart` | `(() => void)` | No | `-` | Callback when the user starts scrubbing |
150
+ | `periodSelectorPlacement` | `above \| below` | No | `-` | Optional placement prop that position the period selector component above or below the chart |
151
+ | `style` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>>` | No | `-` | Custom style for the root element. |
152
+ | `styles` | `{ header?: StyleProp<ViewStyle>; root?: StyleProp<ViewStyle>; }` | No | `-` | Custom styles for the component. |
153
+ | `timePeriodGutter` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | Optional gutter to add to the Period selector. This is useful if you choose to use the full screen width for the chart |
154
+ | `yAxisScalingFactor` | `number` | No | `-` | Scales the sparkline to show more or less variance. Use a number less than 1 for less variance and a number greater than 1 for more variance. If you use a number greater than 1 it may clip the boundaries of the sparkline. |
155
+
157
156