@coinbase/cds-mcp-server 8.17.2 → 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 +8 -0
  2. package/mcp-docs/mobile/components/Accordion.txt +188 -0
  3. package/mcp-docs/mobile/components/AccordionItem.txt +29 -0
  4. package/mcp-docs/mobile/components/Alert.txt +155 -0
  5. package/mcp-docs/mobile/components/AreaChart.txt +265 -0
  6. package/mcp-docs/mobile/components/Avatar.txt +195 -0
  7. package/mcp-docs/mobile/components/AvatarButton.txt +225 -0
  8. package/mcp-docs/mobile/components/Banner.txt +221 -0
  9. package/mcp-docs/mobile/components/BarChart.txt +815 -0
  10. package/mcp-docs/mobile/components/Box.txt +173 -0
  11. package/mcp-docs/mobile/components/BrowserBar.txt +146 -0
  12. package/mcp-docs/mobile/components/Button.txt +198 -0
  13. package/mcp-docs/mobile/components/ButtonGroup.txt +79 -0
  14. package/mcp-docs/mobile/components/Carousel.txt +1083 -0
  15. package/mcp-docs/mobile/components/CartesianChart.txt +825 -0
  16. package/mcp-docs/mobile/components/CellMedia.txt +70 -0
  17. package/mcp-docs/mobile/components/Checkbox.txt +245 -0
  18. package/mcp-docs/mobile/components/CheckboxCell.txt +201 -0
  19. package/mcp-docs/mobile/components/CheckboxGroup.txt +284 -0
  20. package/mcp-docs/mobile/components/Chip.txt +194 -0
  21. package/mcp-docs/mobile/components/Coachmark.txt +157 -0
  22. package/mcp-docs/mobile/components/Collapsible.txt +104 -0
  23. package/mcp-docs/mobile/components/ContainedAssetCard.txt +134 -0
  24. package/mcp-docs/mobile/components/ContentCard.txt +365 -0
  25. package/mcp-docs/mobile/components/ContentCardBody.txt +135 -0
  26. package/mcp-docs/mobile/components/ContentCardFooter.txt +127 -0
  27. package/mcp-docs/mobile/components/ContentCardHeader.txt +145 -0
  28. package/mcp-docs/mobile/components/ContentCell.txt +226 -0
  29. package/mcp-docs/mobile/components/ControlGroup.txt +443 -0
  30. package/mcp-docs/mobile/components/DatePicker.txt +496 -0
  31. package/mcp-docs/mobile/components/Divider.txt +138 -0
  32. package/mcp-docs/mobile/components/DotCount.txt +145 -0
  33. package/mcp-docs/mobile/components/DotStatusColor.txt +58 -0
  34. package/mcp-docs/mobile/components/DotSymbol.txt +134 -0
  35. package/mcp-docs/mobile/components/Fallback.txt +157 -0
  36. package/mcp-docs/mobile/components/FloatingAssetCard.txt +155 -0
  37. package/mcp-docs/mobile/components/HStack.txt +234 -0
  38. package/mcp-docs/mobile/components/HeroSquare.txt +47 -0
  39. package/mcp-docs/mobile/components/Icon.txt +51 -0
  40. package/mcp-docs/mobile/components/IconButton.txt +268 -0
  41. package/mcp-docs/mobile/components/InputChip.txt +187 -0
  42. package/mcp-docs/mobile/components/Interactable.txt +186 -0
  43. package/mcp-docs/mobile/components/LineChart.txt +1324 -0
  44. package/mcp-docs/mobile/components/Link.txt +291 -0
  45. package/mcp-docs/mobile/components/ListCell.txt +412 -0
  46. package/mcp-docs/mobile/components/LogoMark.txt +84 -0
  47. package/mcp-docs/mobile/components/LogoWordMark.txt +93 -0
  48. package/mcp-docs/mobile/components/Lottie.txt +138 -0
  49. package/mcp-docs/mobile/components/LottieStatusAnimation.txt +46 -0
  50. package/mcp-docs/mobile/components/Modal.txt +83 -0
  51. package/mcp-docs/mobile/components/ModalBody.txt +33 -0
  52. package/mcp-docs/mobile/components/ModalFooter.txt +24 -0
  53. package/mcp-docs/mobile/components/ModalHeader.txt +27 -0
  54. package/mcp-docs/mobile/components/MultiContentModule.txt +379 -0
  55. package/mcp-docs/mobile/components/NavigationTitle.txt +131 -0
  56. package/mcp-docs/mobile/components/NavigationTitleSelect.txt +141 -0
  57. package/mcp-docs/mobile/components/NudgeCard.txt +89 -0
  58. package/mcp-docs/mobile/components/Numpad.txt +340 -0
  59. package/mcp-docs/mobile/components/Overlay.txt +151 -0
  60. package/mcp-docs/mobile/components/PageFooter.txt +160 -0
  61. package/mcp-docs/mobile/components/PageHeader.txt +185 -0
  62. package/mcp-docs/mobile/components/PeriodSelector.txt +407 -0
  63. package/mcp-docs/mobile/components/Pictogram.txt +47 -0
  64. package/mcp-docs/mobile/components/Point.txt +204 -0
  65. package/mcp-docs/mobile/components/PortalProvider.txt +78 -0
  66. package/mcp-docs/mobile/components/Pressable.txt +210 -0
  67. package/mcp-docs/mobile/components/ProgressBar.txt +129 -0
  68. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +160 -0
  69. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +137 -0
  70. package/mcp-docs/mobile/components/ProgressCircle.txt +236 -0
  71. package/mcp-docs/mobile/components/Radio.txt +241 -0
  72. package/mcp-docs/mobile/components/RadioCell.txt +201 -0
  73. package/mcp-docs/mobile/components/RadioGroup.txt +281 -0
  74. package/mcp-docs/mobile/components/ReferenceLine.txt +152 -0
  75. package/mcp-docs/mobile/components/RemoteImage.txt +105 -0
  76. package/mcp-docs/mobile/components/RemoteImageGroup.txt +60 -0
  77. package/mcp-docs/mobile/components/RollingNumber.txt +788 -0
  78. package/mcp-docs/mobile/components/Scrubber.txt +203 -0
  79. package/mcp-docs/mobile/components/SearchInput.txt +191 -0
  80. package/mcp-docs/mobile/components/SectionHeader.txt +204 -0
  81. package/mcp-docs/mobile/components/SegmentedTabs.txt +315 -0
  82. package/mcp-docs/mobile/components/Select.txt +211 -0
  83. package/mcp-docs/mobile/components/SelectChip.txt +323 -0
  84. package/mcp-docs/mobile/components/SelectOption.txt +84 -0
  85. package/mcp-docs/mobile/components/SlideButton.txt +330 -0
  86. package/mcp-docs/mobile/components/Spacer.txt +83 -0
  87. package/mcp-docs/mobile/components/Sparkline.txt +122 -0
  88. package/mcp-docs/mobile/components/SparklineGradient.txt +106 -0
  89. package/mcp-docs/mobile/components/SparklineInteractive.txt +156 -0
  90. package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +72 -0
  91. package/mcp-docs/mobile/components/Spinner.txt +48 -0
  92. package/mcp-docs/mobile/components/SpotIcon.txt +47 -0
  93. package/mcp-docs/mobile/components/SpotRectangle.txt +47 -0
  94. package/mcp-docs/mobile/components/SpotSquare.txt +47 -0
  95. package/mcp-docs/mobile/components/Stepper.txt +527 -0
  96. package/mcp-docs/mobile/components/SubBrandLogoMark.txt +125 -0
  97. package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +125 -0
  98. package/mcp-docs/mobile/components/Switch.txt +97 -0
  99. package/mcp-docs/mobile/components/TabIndicator.txt +48 -0
  100. package/mcp-docs/mobile/components/TabLabel.txt +153 -0
  101. package/mcp-docs/mobile/components/TabNavigation.txt +146 -0
  102. package/mcp-docs/mobile/components/TabbedChips.txt +142 -0
  103. package/mcp-docs/mobile/components/Tabs.txt +190 -0
  104. package/mcp-docs/mobile/components/Tag.txt +300 -0
  105. package/mcp-docs/mobile/components/Text.txt +211 -0
  106. package/mcp-docs/mobile/components/TextInput.txt +717 -0
  107. package/mcp-docs/mobile/components/ThemeProvider.txt +132 -0
  108. package/mcp-docs/mobile/components/Toast.txt +196 -0
  109. package/mcp-docs/mobile/components/Tooltip.txt +59 -0
  110. package/mcp-docs/mobile/components/TopNavBar.txt +161 -0
  111. package/mcp-docs/mobile/components/Tour.txt +158 -0
  112. package/mcp-docs/mobile/components/Tray.txt +252 -0
  113. package/mcp-docs/mobile/components/UpsellCard.txt +321 -0
  114. package/mcp-docs/mobile/components/VStack.txt +222 -0
  115. package/mcp-docs/mobile/components/XAxis.txt +621 -0
  116. package/mcp-docs/mobile/components/YAxis.txt +567 -0
  117. package/mcp-docs/mobile/getting-started/ai-overview.txt +108 -0
  118. package/mcp-docs/mobile/getting-started/installation.txt +57 -0
  119. package/mcp-docs/mobile/getting-started/introduction.txt +102 -0
  120. package/mcp-docs/mobile/getting-started/playground.txt +28 -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 +72 -0
  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 +280 -0
  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 +321 -0
  130. package/mcp-docs/mobile/routes.txt +139 -0
  131. package/mcp-docs/web/components/Accordion.txt +189 -0
  132. package/mcp-docs/web/components/AccordionItem.txt +31 -0
  133. package/mcp-docs/web/components/Alert.txt +164 -0
  134. package/mcp-docs/web/components/AreaChart.txt +510 -0
  135. package/mcp-docs/web/components/Avatar.txt +211 -0
  136. package/mcp-docs/web/components/AvatarButton.txt +240 -0
  137. package/mcp-docs/web/components/Banner.txt +226 -0
  138. package/mcp-docs/web/components/BarChart.txt +1267 -0
  139. package/mcp-docs/web/components/Box.txt +175 -0
  140. package/mcp-docs/web/components/Button.txt +212 -0
  141. package/mcp-docs/web/components/ButtonGroup.txt +79 -0
  142. package/mcp-docs/web/components/Calendar.txt +181 -0
  143. package/mcp-docs/web/components/Carousel.txt +1575 -0
  144. package/mcp-docs/web/components/CartesianChart.txt +1044 -0
  145. package/mcp-docs/web/components/CellMedia.txt +56 -0
  146. package/mcp-docs/web/components/Checkbox.txt +188 -0
  147. package/mcp-docs/web/components/CheckboxCell.txt +202 -0
  148. package/mcp-docs/web/components/CheckboxGroup.txt +219 -0
  149. package/mcp-docs/web/components/Chip.txt +196 -0
  150. package/mcp-docs/web/components/Coachmark.txt +188 -0
  151. package/mcp-docs/web/components/Collapsible.txt +119 -0
  152. package/mcp-docs/web/components/ContainedAssetCard.txt +232 -0
  153. package/mcp-docs/web/components/ContentCard.txt +367 -0
  154. package/mcp-docs/web/components/ContentCardBody.txt +137 -0
  155. package/mcp-docs/web/components/ContentCardFooter.txt +129 -0
  156. package/mcp-docs/web/components/ContentCardHeader.txt +147 -0
  157. package/mcp-docs/web/components/ContentCell.txt +219 -0
  158. package/mcp-docs/web/components/ControlGroup.txt +436 -0
  159. package/mcp-docs/web/components/DatePicker.txt +505 -0
  160. package/mcp-docs/web/components/Divider.txt +143 -0
  161. package/mcp-docs/web/components/DotCount.txt +149 -0
  162. package/mcp-docs/web/components/DotStatusColor.txt +58 -0
  163. package/mcp-docs/web/components/DotSymbol.txt +137 -0
  164. package/mcp-docs/web/components/Dropdown.txt +119 -0
  165. package/mcp-docs/web/components/Fallback.txt +163 -0
  166. package/mcp-docs/web/components/FloatingAssetCard.txt +250 -0
  167. package/mcp-docs/web/components/FullscreenAlert.txt +69 -0
  168. package/mcp-docs/web/components/FullscreenModal.txt +145 -0
  169. package/mcp-docs/web/components/FullscreenModalLayout.txt +187 -0
  170. package/mcp-docs/web/components/Grid.txt +236 -0
  171. package/mcp-docs/web/components/GridColumn.txt +209 -0
  172. package/mcp-docs/web/components/HStack.txt +236 -0
  173. package/mcp-docs/web/components/HeroSquare.txt +48 -0
  174. package/mcp-docs/web/components/Icon.txt +145 -0
  175. package/mcp-docs/web/components/IconButton.txt +390 -0
  176. package/mcp-docs/web/components/InputChip.txt +187 -0
  177. package/mcp-docs/web/components/Interactable.txt +193 -0
  178. package/mcp-docs/web/components/LineChart.txt +1576 -0
  179. package/mcp-docs/web/components/Link.txt +243 -0
  180. package/mcp-docs/web/components/ListCell.txt +418 -0
  181. package/mcp-docs/web/components/LogoMark.txt +84 -0
  182. package/mcp-docs/web/components/LogoWordMark.txt +93 -0
  183. package/mcp-docs/web/components/Lottie.txt +157 -0
  184. package/mcp-docs/web/components/LottieStatusAnimation.txt +57 -0
  185. package/mcp-docs/web/components/MediaQueryProvider.txt +108 -0
  186. package/mcp-docs/web/components/Modal.txt +196 -0
  187. package/mcp-docs/web/components/ModalBody.txt +117 -0
  188. package/mcp-docs/web/components/ModalFooter.txt +119 -0
  189. package/mcp-docs/web/components/ModalHeader.txt +123 -0
  190. package/mcp-docs/web/components/MultiContentModule.txt +381 -0
  191. package/mcp-docs/web/components/NavigationBar.txt +102 -0
  192. package/mcp-docs/web/components/NavigationTitle.txt +25 -0
  193. package/mcp-docs/web/components/NavigationTitleSelect.txt +45 -0
  194. package/mcp-docs/web/components/NudgeCard.txt +181 -0
  195. package/mcp-docs/web/components/Overlay.txt +171 -0
  196. package/mcp-docs/web/components/PageFooter.txt +184 -0
  197. package/mcp-docs/web/components/PageHeader.txt +243 -0
  198. package/mcp-docs/web/components/Pagination.txt +499 -0
  199. package/mcp-docs/web/components/PeriodSelector.txt +703 -0
  200. package/mcp-docs/web/components/Pictogram.txt +48 -0
  201. package/mcp-docs/web/components/Point.txt +460 -0
  202. package/mcp-docs/web/components/PortalProvider.txt +76 -0
  203. package/mcp-docs/web/components/Pressable.txt +193 -0
  204. package/mcp-docs/web/components/ProgressBar.txt +163 -0
  205. package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +212 -0
  206. package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +181 -0
  207. package/mcp-docs/web/components/ProgressCircle.txt +443 -0
  208. package/mcp-docs/web/components/Radio.txt +219 -0
  209. package/mcp-docs/web/components/RadioCell.txt +215 -0
  210. package/mcp-docs/web/components/RadioGroup.txt +288 -0
  211. package/mcp-docs/web/components/ReferenceLine.txt +451 -0
  212. package/mcp-docs/web/components/RemoteImage.txt +165 -0
  213. package/mcp-docs/web/components/RemoteImageGroup.txt +86 -0
  214. package/mcp-docs/web/components/RollingNumber.txt +1021 -0
  215. package/mcp-docs/web/components/Scrubber.txt +231 -0
  216. package/mcp-docs/web/components/SearchInput.txt +117 -0
  217. package/mcp-docs/web/components/SectionHeader.txt +217 -0
  218. package/mcp-docs/web/components/SegmentedTabs.txt +324 -0
  219. package/mcp-docs/web/components/Select.txt +224 -0
  220. package/mcp-docs/web/components/SelectChip.txt +314 -0
  221. package/mcp-docs/web/components/SelectOption.txt +165 -0
  222. package/mcp-docs/web/components/Sidebar.txt +349 -0
  223. package/mcp-docs/web/components/SidebarItem.txt +131 -0
  224. package/mcp-docs/web/components/SidebarMoreMenu.txt +30 -0
  225. package/mcp-docs/web/components/Spacer.txt +173 -0
  226. package/mcp-docs/web/components/Sparkline.txt +122 -0
  227. package/mcp-docs/web/components/SparklineGradient.txt +106 -0
  228. package/mcp-docs/web/components/SparklineInteractive.txt +153 -0
  229. package/mcp-docs/web/components/SparklineInteractiveHeader.txt +76 -0
  230. package/mcp-docs/web/components/Spinner.txt +128 -0
  231. package/mcp-docs/web/components/SpotIcon.txt +48 -0
  232. package/mcp-docs/web/components/SpotRectangle.txt +48 -0
  233. package/mcp-docs/web/components/SpotSquare.txt +48 -0
  234. package/mcp-docs/web/components/Stepper.txt +682 -0
  235. package/mcp-docs/web/components/SubBrandLogoMark.txt +125 -0
  236. package/mcp-docs/web/components/SubBrandLogoWordMark.txt +125 -0
  237. package/mcp-docs/web/components/Switch.txt +85 -0
  238. package/mcp-docs/web/components/TabIndicator.txt +48 -0
  239. package/mcp-docs/web/components/TabLabel.txt +158 -0
  240. package/mcp-docs/web/components/TabNavigation.txt +159 -0
  241. package/mcp-docs/web/components/TabbedChips.txt +155 -0
  242. package/mcp-docs/web/components/Table.txt +367 -0
  243. package/mcp-docs/web/components/TableBody.txt +83 -0
  244. package/mcp-docs/web/components/TableCaption.txt +102 -0
  245. package/mcp-docs/web/components/TableCell.txt +165 -0
  246. package/mcp-docs/web/components/TableCellFallback.txt +97 -0
  247. package/mcp-docs/web/components/TableFooter.txt +83 -0
  248. package/mcp-docs/web/components/TableHeader.txt +100 -0
  249. package/mcp-docs/web/components/TableRow.txt +140 -0
  250. package/mcp-docs/web/components/Tabs.txt +212 -0
  251. package/mcp-docs/web/components/Tag.txt +304 -0
  252. package/mcp-docs/web/components/Text.txt +232 -0
  253. package/mcp-docs/web/components/TextInput.txt +652 -0
  254. package/mcp-docs/web/components/ThemeProvider.txt +199 -0
  255. package/mcp-docs/web/components/TileButton.txt +158 -0
  256. package/mcp-docs/web/components/Toast.txt +203 -0
  257. package/mcp-docs/web/components/Tooltip.txt +89 -0
  258. package/mcp-docs/web/components/Tour.txt +179 -0
  259. package/mcp-docs/web/components/Tray.txt +288 -0
  260. package/mcp-docs/web/components/UpsellCard.txt +319 -0
  261. package/mcp-docs/web/components/VStack.txt +224 -0
  262. package/mcp-docs/web/components/XAxis.txt +619 -0
  263. package/mcp-docs/web/components/YAxis.txt +548 -0
  264. package/mcp-docs/web/getting-started/ai-overview.txt +108 -0
  265. package/mcp-docs/web/getting-started/installation.txt +103 -0
  266. package/mcp-docs/web/getting-started/introduction.txt +102 -0
  267. package/mcp-docs/web/getting-started/playground.txt +28 -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 +61 -0
  272. package/mcp-docs/web/hooks/useDimensions.txt +114 -0
  273. package/mcp-docs/web/hooks/useEventHandler.txt +120 -0
  274. package/mcp-docs/web/hooks/useHasMounted.txt +75 -0
  275. package/mcp-docs/web/hooks/useIsoEffect.txt +58 -0
  276. package/mcp-docs/web/hooks/useMediaQuery.txt +114 -0
  277. package/mcp-docs/web/hooks/useMergeRefs.txt +116 -0
  278. package/mcp-docs/web/hooks/useOverlayContentContext.txt +279 -0
  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 +82 -0
  282. package/mcp-docs/web/hooks/useTheme.txt +364 -0
  283. package/mcp-docs/web/routes.txt +163 -0
  284. package/package.json +1 -1
@@ -0,0 +1,201 @@
1
+ # RadioCell
2
+
3
+ A selectable cell that pairs a radio button with a title and description for single-choice selections.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { RadioCell } from '@coinbase/cds-mobile/controls/RadioCell'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Basic usage
14
+
15
+ ```tsx
16
+ function RadioCellExample() {
17
+ const [value, setValue] = React.useState('one');
18
+ return (
19
+ <VStack gap={2}>
20
+ <RadioCell
21
+ title="Option one"
22
+ description="With a description"
23
+ checked={value === 'one'}
24
+ onChange={setValue}
25
+ value="one"
26
+ />
27
+ <RadioCell title="Option two" checked={value === 'two'} onChange={setValue} value="two" />
28
+ <RadioCell
29
+ title="Disabled option"
30
+ checked={false}
31
+ onChange={() => {}}
32
+ value="three"
33
+ disabled
34
+ />
35
+ </VStack>
36
+ );
37
+ }
38
+ ```
39
+
40
+ ### With Custom Content and Styling
41
+
42
+ ```tsx
43
+ function CustomRadioCellExample() {
44
+ const [selectedPlan, setSelectedPlan] = React.useState('pro');
45
+ return (
46
+ <VStack gap={2}>
47
+ <RadioCell
48
+ checked={selectedPlan === 'basic'}
49
+ description={
50
+ <VStack gap={1}>
51
+ <Text color="fgMuted" font="body">
52
+ Perfect for individuals getting started
53
+ </Text>
54
+ <Text font="label1">$9/month • Up to 5 projects • 1GB storage</Text>
55
+ </VStack>
56
+ }
57
+ onChange={setSelectedPlan}
58
+ title="Basic Plan"
59
+ value="basic"
60
+ />
61
+ <RadioCell
62
+ checked={selectedPlan === 'pro'}
63
+ description={
64
+ <VStack gap={1}>
65
+ <Text color="fgMuted" font="body">
66
+ Great for growing teams and businesses
67
+ </Text>
68
+ <Text font="label1">$29/month • Unlimited projects • 10GB storage</Text>
69
+ <Text color="fgPositive" font="caption">
70
+ • Most Popular
71
+ </Text>
72
+ </VStack>
73
+ }
74
+ onChange={setSelectedPlan}
75
+ title="Pro Plan"
76
+ value="pro"
77
+ />
78
+ </VStack>
79
+ );
80
+ }
81
+ ```
82
+
83
+ ## Props
84
+
85
+ | Prop | Type | Required | Default | Description |
86
+ | --- | --- | --- | --- | --- |
87
+ | `title` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | Yes | `-` | - |
88
+ | `alignContent` | `flex-start \| flex-end \| center \| stretch \| space-between \| space-around \| space-evenly` | No | `-` | - |
89
+ | `alignItems` | `flex-start \| flex-end \| center \| stretch \| baseline` | No | `-` | - |
90
+ | `alignSelf` | `auto \| FlexAlignType` | No | `-` | - |
91
+ | `aspectRatio` | `string \| number` | No | `-` | - |
92
+ | `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). |
93
+ | `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. |
94
+ | `block` | `boolean` | No | `-` | Set element to block and expand to 100% width. |
95
+ | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
96
+ | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
97
+ | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
98
+ | `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 | `-` | - |
99
+ | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
100
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
101
+ | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
102
+ | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
103
+ | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
104
+ | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
105
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
106
+ | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
107
+ | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
108
+ | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
109
+ | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
110
+ | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
111
+ | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
112
+ | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
113
+ | `bottom` | `string \| number` | No | `-` | - |
114
+ | `checked` | `boolean` | No | `-` | Set the control to selected/on. |
115
+ | `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 | `-` | - |
116
+ | `columnGap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
117
+ | `contentStyle` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>>` | No | `-` | Apply animated styles to the inner container. |
118
+ | `controlColor` | `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 | `bgPrimary` | Sets the checked/active color of the control. |
119
+ | `dangerouslySetBackground` | `string` | No | `-` | - |
120
+ | `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. |
121
+ | `description` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | - |
122
+ | `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. |
123
+ | `disabled` | `boolean` | No | `-` | Disable user interaction. Is the element currently disabled. Whether the press behavior is disabled. |
124
+ | `display` | `flex \| none` | No | `-` | - |
125
+ | `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. |
126
+ | `feedback` | `none \| light \| normal \| heavy` | No | `none` | Haptic feedback to trigger when being pressed. |
127
+ | `flexBasis` | `string \| number` | No | `-` | - |
128
+ | `flexDirection` | `row \| column \| row-reverse \| column-reverse` | No | `-` | - |
129
+ | `flexGrow` | `number` | No | `-` | - |
130
+ | `flexShrink` | `number` | No | `-` | - |
131
+ | `flexWrap` | `wrap \| nowrap \| wrap-reverse` | No | `-` | - |
132
+ | `font` | `inherit \| FontFamily` | No | `-` | - |
133
+ | `fontFamily` | `inherit \| FontFamily` | No | `-` | - |
134
+ | `fontSize` | `inherit \| FontSize` | No | `-` | - |
135
+ | `fontWeight` | `inherit \| FontWeight` | No | `-` | - |
136
+ | `gap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
137
+ | `height` | `string \| number` | No | `-` | - |
138
+ | `indeterminate` | `boolean` | No | `-` | Enable indeterminate state. Useful when you want to indicate that sub-items of a control are partially filled. |
139
+ | `justifyContent` | `flex-start \| flex-end \| center \| space-between \| space-around \| space-evenly` | No | `-` | - |
140
+ | `left` | `string \| number` | No | `-` | - |
141
+ | `lineHeight` | `inherit \| LineHeight` | No | `-` | - |
142
+ | `loading` | `boolean` | No | `-` | Is the element currenty loading. When set to true, will disable element from press and keyboard events Is the element currenty loading. |
143
+ | `margin` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
144
+ | `marginBottom` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
145
+ | `marginEnd` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
146
+ | `marginStart` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
147
+ | `marginTop` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
148
+ | `marginX` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
149
+ | `marginY` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
150
+ | `maxHeight` | `string \| number` | No | `-` | - |
151
+ | `maxWidth` | `string \| number` | No | `-` | - |
152
+ | `minHeight` | `string \| number` | No | `-` | - |
153
+ | `minWidth` | `string \| number` | No | `-` | - |
154
+ | `onChange` | `((value: T, checked?: boolean \| undefined) => void) \| undefined` | No | `-` | Toggle control selected state. |
155
+ | `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
156
+ | `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
157
+ | `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
158
+ | `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
159
+ | `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
160
+ | `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
161
+ | `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
162
+ | `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
163
+ | `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
164
+ | `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
165
+ | `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
166
+ | `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
167
+ | `onPress` | `((event: GestureResponderEvent) => void) \| null` | No | `-` | Called when a single tap gesture is detected. |
168
+ | `opacity` | `number \| AnimatedNode` | No | `-` | - |
169
+ | `overflow` | `visible \| hidden \| scroll` | No | `-` | - |
170
+ | `padding` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
171
+ | `paddingBottom` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
172
+ | `paddingEnd` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
173
+ | `paddingStart` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
174
+ | `paddingTop` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
175
+ | `paddingX` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
176
+ | `paddingY` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
177
+ | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
178
+ | `position` | `absolute \| relative \| static \| fixed \| sticky` | No | `-` | - |
179
+ | `pressedBorderColor` | `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 | `-` | - |
180
+ | `pressedBorderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
181
+ | `readOnly` | `boolean` | No | `-` | Set the control to ready-only. Similar effect as disabled. |
182
+ | `ref` | `null \| (instance: View \| null) => void \| MutableRefObject<View \| null>` | No | `-` | - |
183
+ | `right` | `string \| number` | No | `-` | - |
184
+ | `rowGap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
185
+ | `styles` | `{ root?: StyleProp<ViewStyle>; radioContainer?: StyleProp<ViewStyle>; contentContainer?: StyleProp<ViewStyle>; title?: StyleProp<TextStyle>; description?: StyleProp<TextStyle>; }` | No | `-` | - |
186
+ | `testID` | `string` | No | `-` | Used to locate this view in end-to-end tests. Used to locate this element in unit and end-to-end tests. |
187
+ | `textAlign` | `left \| right \| auto \| center \| justify` | No | `-` | - |
188
+ | `textDecorationLine` | `none \| underline \| line-through \| underline line-through` | No | `-` | - |
189
+ | `textDecorationStyle` | `solid \| dotted \| dashed \| double` | No | `-` | - |
190
+ | `textTransform` | `none \| capitalize \| uppercase \| lowercase` | No | `-` | - |
191
+ | `top` | `string \| number` | No | `-` | - |
192
+ | `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 | `-` | - |
193
+ | `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 |
194
+ | `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 |
195
+ | `userSelect` | `none \| auto \| contain \| text \| all` | No | `-` | - |
196
+ | `value` | `string` | No | `-` | Value of the option. Useful for multiple choice. |
197
+ | `width` | `string \| number` | No | `-` | - |
198
+ | `wrapperStyles` | `{ base?: StyleProp<ViewStyle>; pressed?: StyleProp<ViewStyle>; disabled?: StyleProp<ViewStyle>; }` | No | `-` | Apply styles to the outer container. |
199
+ | `zIndex` | `number` | No | `-` | - |
200
+
201
+
@@ -0,0 +1,281 @@
1
+ # RadioGroup
2
+
3
+ Radio is a control component that allows users to select one option from a set.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { RadioGroup } from '@coinbase/cds-mobile/controls/RadioGroup'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Deprecation Notice
14
+
15
+ :::danger Deprecated Component
16
+
17
+ **RadioGroup is deprecated and will be removed in a future version.**
18
+
19
+ Use **[ControlGroup](/components/inputs/ControlGroup)** with `accessibilityRole="radiogroup"` instead for better accessibility, consistency, and maintainability.
20
+
21
+ :::
22
+
23
+ :::caution Types
24
+
25
+ RadioGroup onChange fails without a string type declaration for setGroup fns.
26
+
27
+ ```
28
+ const [group, setGroup] = useState<string>();
29
+ ```
30
+
31
+ :::
32
+
33
+ ### Migration Guide
34
+
35
+ #### ✅ Recommended: Using ControlGroup
36
+
37
+ The new recommended approach provides better accessibility, cleaner API, and consistent behavior across the design system.
38
+
39
+ ```jsx
40
+ function RecommendedRadioGroup() {
41
+ const options = [
42
+ { value: 'btc', children: 'Bitcoin' },
43
+ { value: 'eth', children: 'Ethereum' },
44
+ { value: 'ltc', children: 'Litecoin' },
45
+ ];
46
+
47
+ const [selectedCurrency, setSelectedCurrency] = useState('btc');
48
+
49
+ return (
50
+ <VStack gap={2}>
51
+ <ControlGroup
52
+ accessibilityRole="radiogroup"
53
+ ControlComponent={Radio}
54
+ label="Choose a currency"
55
+ options={options}
56
+ value={selectedCurrency}
57
+ onChange={setSelectedCurrency}
58
+ name="recommended-radio-group"
59
+ />
60
+ <Text font="caption" color="fgMuted">
61
+ Selected: {selectedCurrency}
62
+ </Text>
63
+ </VStack>
64
+ );
65
+ }
66
+ ```
67
+
68
+ #### Migration Steps
69
+
70
+ 1. **Replace RadioGroup with [ControlGroup](/components/inputs/ControlGroup)**:
71
+
72
+ ```jsx
73
+ // Old (deprecated)
74
+ <RadioGroup
75
+ value={selectedValue}
76
+ onChange={onChange}
77
+ options={{ btc: 'Bitcoin', eth: 'Ethereum' }}
78
+ />
79
+
80
+ // New (recommended)
81
+ <ControlGroup
82
+ accessibilityRole="radiogroup"
83
+ ControlComponent={Radio}
84
+ options={[
85
+ { value: 'btc', children: 'Bitcoin' },
86
+ { value: 'eth', children: 'Ethereum' }
87
+ ]}
88
+ value={selectedValue}
89
+ onChange={onChange}
90
+ />
91
+ ```
92
+
93
+ 2. **Update options format**:
94
+
95
+ ```jsx
96
+ // Old: Object format
97
+ const options = { btc: 'Bitcoin', eth: 'Ethereum' };
98
+
99
+ // New: Array format
100
+ const options = [
101
+ { value: 'btc', children: 'Bitcoin' },
102
+ { value: 'eth', children: 'Ethereum' },
103
+ ];
104
+ ```
105
+
106
+ 3. **Update onChange handler**:
107
+
108
+ ```jsx
109
+ // Old: Direct value callback
110
+ const oldOnChange = (value) => setSelected(value);
111
+
112
+ // New: Value-only callback (mobile pattern)
113
+ const newOnChange = (value) => setSelected(value);
114
+ ```
115
+
116
+ 4. **Update accessibility**:
117
+
118
+ ```jsx
119
+ // Old: No specific role requirement
120
+ <RadioGroup label="Choose option" />
121
+
122
+ // New: Explicit accessibility role
123
+ <ControlGroup
124
+ accessibilityRole="radiogroup"
125
+ label="Choose option"
126
+ />
127
+ ```
128
+
129
+ ### Legacy Usage (Deprecated)
130
+
131
+ :::warning Legacy Example
132
+
133
+ The following examples show the **deprecated** RadioGroup usage. **Do not use this in new code.** Use [ControlGroup](/components/inputs/ControlGroup) instead.
134
+
135
+ :::
136
+
137
+ #### Basic RadioGroup (Legacy)
138
+
139
+ ```jsx
140
+ function LegacyRadioGroupDemo() {
141
+ const options = {
142
+ btc: 'Bitcoin',
143
+ eth: 'Ethereum',
144
+ dai: 'Dai',
145
+ };
146
+
147
+ const [group, setGroup] = useState('btc');
148
+
149
+ return (
150
+ <VStack gap={2}>
151
+ <Text font="headline">Currency Selection (Legacy RadioGroup)</Text>
152
+ <RadioGroup
153
+ id="currency-radio-group"
154
+ label="Choose a currency"
155
+ name="radio-group1"
156
+ value={group}
157
+ onChange={setGroup}
158
+ options={options}
159
+ />
160
+ <Text font="caption" color="fgMuted">
161
+ Selected: {group}
162
+ </Text>
163
+ </VStack>
164
+ );
165
+ }
166
+ ```
167
+
168
+ #### With Accessibility Features (Legacy)
169
+
170
+ ```jsx
171
+ function LegacyAccessibleRadioGroup() {
172
+ const options = {
173
+ 'plan-basic': 'Basic Plan',
174
+ 'plan-pro': 'Professional Plan',
175
+ 'plan-enterprise': 'Enterprise Plan',
176
+ };
177
+
178
+ const [selectedPlan, setSelectedPlan] = useState('plan-pro');
179
+
180
+ return (
181
+ <RadioGroup
182
+ accessibilityLabel="Choose your subscription plan"
183
+ label="Subscription Plans"
184
+ value={selectedPlan}
185
+ onChange={setSelectedPlan}
186
+ options={options}
187
+ />
188
+ );
189
+ }
190
+ ```
191
+
192
+ #### Color Customization (Legacy)
193
+
194
+ Like other control components (i.e. Checkbox, Switch), you can customize the color of the Radio by setting the `controlColor` prop.
195
+
196
+ ```jsx
197
+ function CustomColors() {
198
+ // static values should live outside the component in product code.
199
+ const options = {
200
+ btc: 'Bitcoin',
201
+ eth: 'Ethereum',
202
+ dai: 'Dai',
203
+ };
204
+
205
+ const [group, setGroup] = useState();
206
+
207
+ return (
208
+ <RadioGroup
209
+ id="mascot-radio-group"
210
+ aria-labelledby="choose-a-mascot"
211
+ name="radio-group2"
212
+ controlColor="accentBoldGreen"
213
+ value={group}
214
+ onChange={setGroup}
215
+ options={options}
216
+ />
217
+ );
218
+ }
219
+ ```
220
+
221
+ For more advanced color customization, you can use additional style props on individual Radio components like `background`, `borderColor`, and `color`:
222
+
223
+ ```jsx
224
+ function AdvancedCustomColors() {
225
+ const [checked, setChecked] = useState(false);
226
+
227
+ return (
228
+ <VStack gap={2}>
229
+ <Radio checked={checked} controlColor="bgPositive" onChange={() => setChecked((s) => !s)}>
230
+ Control color prop
231
+ </Radio>
232
+ <Radio
233
+ background={checked ? 'accentBoldPurple' : 'bg'}
234
+ borderColor={checked ? 'bgNegative' : 'bgWarning'}
235
+ checked={checked}
236
+ color="bgPrimary"
237
+ controlColor="bgPositive"
238
+ onChange={() => setChecked((s) => !s)}
239
+ >
240
+ Advanced styling
241
+ </Radio>
242
+ </VStack>
243
+ );
244
+ }
245
+ ```
246
+
247
+ ## Props
248
+
249
+ | Prop | Type | Required | Default | Description |
250
+ | --- | --- | --- | --- | --- |
251
+ | `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 | `bg` | Background color of the overlay (element being interacted with). |
252
+ | `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 | `checked ? controlColor : 'bgLineHeavy'` | - |
253
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `1000` | - |
254
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
255
+ | `checked` | `boolean` | No | `-` | Set the control to selected/on. |
256
+ | `children` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Label for the control option. |
257
+ | `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 | `black` | - |
258
+ | `controlColor` | `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 | `bgPrimary` | Sets the checked/active color of the control. |
259
+ | `disabled` | `boolean` | No | `-` | Disable user interaction. |
260
+ | `indeterminate` | `boolean` | No | `-` | Enable indeterminate state. Useful when you want to indicate that sub-items of a control are partially filled. |
261
+ | `onChange` | `((value: T, checked?: boolean \| undefined) => void) \| undefined` | No | `-` | Toggle control selected state. |
262
+ | `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
263
+ | `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
264
+ | `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
265
+ | `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
266
+ | `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
267
+ | `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
268
+ | `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
269
+ | `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
270
+ | `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
271
+ | `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
272
+ | `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
273
+ | `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
274
+ | `onPress` | `((event: GestureResponderEvent) => void) \| null` | No | `-` | Called when a single tap gesture is detected. |
275
+ | `readOnly` | `boolean` | No | `-` | Set the control to ready-only. Similar effect as disabled. |
276
+ | `ref` | `null \| (instance: View \| null) => void \| RefObject<View>` | No | `-` | - |
277
+ | `style` | `ViewStyle` | No | `-` | - |
278
+ | `testID` | `string` | No | `-` | Used to locate this view in end-to-end tests. |
279
+ | `value` | `string` | No | `-` | Value of the option. Useful for multiple choice. |
280
+
281
+
@@ -0,0 +1,152 @@
1
+ # ReferenceLine
2
+
3
+ A horizontal or vertical reference line to mark important values on a chart, such as targets, thresholds, or baseline values.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { ReferenceLine } from '@coinbase/cds-mobile-visualization'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Basic Example
14
+
15
+ ReferenceLine can be used to add important details to a chart, such as a reference price or date.
16
+
17
+ ```jsx
18
+ <LineChart
19
+ height={150}
20
+ series={[
21
+ {
22
+ id: 'prices',
23
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
24
+ },
25
+ ]}
26
+ inset={0}
27
+ curve="monotone"
28
+ showArea
29
+ >
30
+ <ReferenceLine
31
+ dataX={5}
32
+ label="Vertical Reference Line"
33
+ labelProps={{ horizontalAlignment: 'left', dx: 8 }}
34
+ />
35
+ <ReferenceLine
36
+ dataY={50}
37
+ label="Horizontal Reference Line"
38
+ labelProps={{ verticalAlignment: 'bottom', dy: -8, horizontalAlignment: 'right' }}
39
+ />
40
+ </LineChart>
41
+ ```
42
+
43
+ ### Data Values
44
+
45
+ ReferenceLine relies on `dataX` or `dataY` to position the line. Passing in `dataY` will create a horizontal line across the y axis at that value, and passing in `dataX` will do the same along the x axis.
46
+
47
+ ```jsx
48
+ function DataValuesExample() {
49
+ const theme = useTheme();
50
+ return (
51
+ <LineChart
52
+ showArea
53
+ curve="natural"
54
+ height={150}
55
+ series={[
56
+ {
57
+ id: 'growth',
58
+ data: [
59
+ 2, 4, 8, 15, 30, 65, 140, 280, 580, 1200, 2400, 4800, 9500, 19000, 38000, 75000, 150000,
60
+ ],
61
+ color: theme.color.fgPositive,
62
+ },
63
+ ]}
64
+ >
65
+ <ReferenceLine
66
+ dataY={10000}
67
+ label="10,000"
68
+ labelPosition="left"
69
+ labelProps={{ verticalAlignment: 'bottom', dy: -4 }}
70
+ />
71
+ <ReferenceLine
72
+ dataY={100000}
73
+ label="100,000"
74
+ labelPosition="left"
75
+ labelProps={{ verticalAlignment: 'bottom', dy: -4 }}
76
+ />
77
+ </LineChart>
78
+ );
79
+ }
80
+ ```
81
+
82
+ ### Customization
83
+
84
+ #### Label Style
85
+
86
+ You can adjust the style of the label using the `labelProps` prop.
87
+
88
+ ```jsx
89
+ function LabelStyleExample() {
90
+ const theme = useTheme();
91
+ return (
92
+ <LineChart
93
+ curve="monotone"
94
+ height={150}
95
+ inset={{ right: 4 }}
96
+ series={[
97
+ {
98
+ id: 'prices',
99
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
100
+ },
101
+ ]}
102
+ >
103
+ <ReferenceLine
104
+ dataY={25}
105
+ label="Liquidation"
106
+ labelPosition="left"
107
+ labelProps={{
108
+ horizontalAlignment: 'left',
109
+ dx: 12,
110
+ borderRadius: 4,
111
+ inset: { top: 4, bottom: 4, left: 8, right: 8 },
112
+ color: `rgb(${theme.color.accentSubtleYellow})`,
113
+ background: theme.color.accentSubtleYellow,
114
+ font: 'label1',
115
+ }}
116
+ stroke={theme.color.bgWarning}
117
+ />
118
+ <ReferenceLine
119
+ dataY={25}
120
+ label="$25"
121
+ labelPosition="right"
122
+ labelProps={{
123
+ horizontalAlignment: 'right',
124
+ dx: -12,
125
+ borderRadius: 4,
126
+ inset: { top: 2, bottom: 2, left: 4, right: 4 },
127
+ color: `rgb(${theme.color.yellow70})`,
128
+ background: theme.color.bg,
129
+ font: 'label1',
130
+ }}
131
+ stroke="transparent"
132
+ />
133
+ </LineChart>
134
+ );
135
+ }
136
+ ```
137
+
138
+ ## Props
139
+
140
+ | Prop | Type | Required | Default | Description |
141
+ | --- | --- | --- | --- | --- |
142
+ | `LineComponent` | `LineComponent` | No | `DottedLine` | Component to render the line. |
143
+ | `dataX` | `number` | No | `-` | X-value for vertical reference line (data index). |
144
+ | `dataY` | `number` | No | `-` | Y-value for horizontal reference line (data value). |
145
+ | `label` | `null \| string \| number \| ReactElement<TSpanProps, TSpan> \| ReactElement<TextPathProps, TextPath> \| ValidChartTextChildElements[]` | No | `-` | Label content to display near the reference line. Can be a string or ReactNode for rich formatting. |
146
+ | `labelPosition` | `TextHorizontalAlignment \| TextVerticalAlignment` | No | `'right' 'top'` | Position of the label along the horizontal line. Position of the label along the vertical line. |
147
+ | `labelProps` | `ReferenceLineLabelProps` | No | `-` | Props for the label rendering. Consolidates styling and positioning options for the ChartText component. Alignment defaults are set based on line orientation and can be overridden here. |
148
+ | `stroke` | `string` | No | `theme.color.bgLine` | The color of the line. |
149
+ | `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 |
150
+ | `yAxisId` | `string` | No | `-` | The ID of the y-axis to use for positioning. Defaults to defaultAxisId if not specified. |
151
+
152
+