@coinbase/cds-mcp-server 8.17.1 → 8.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/mcp-docs/mobile/components/Accordion.txt +189 -0
  3. package/mcp-docs/mobile/components/AccordionItem.txt +30 -0
  4. package/mcp-docs/mobile/components/Alert.txt +156 -0
  5. package/mcp-docs/mobile/components/AreaChart.txt +266 -0
  6. package/mcp-docs/mobile/components/Avatar.txt +196 -0
  7. package/mcp-docs/mobile/components/AvatarButton.txt +226 -0
  8. package/mcp-docs/mobile/components/Banner.txt +222 -0
  9. package/mcp-docs/mobile/components/BarChart.txt +816 -0
  10. package/mcp-docs/mobile/components/Box.txt +174 -0
  11. package/mcp-docs/mobile/components/BrowserBar.txt +147 -0
  12. package/mcp-docs/mobile/components/Button.txt +199 -0
  13. package/mcp-docs/mobile/components/ButtonGroup.txt +80 -0
  14. package/mcp-docs/mobile/components/Carousel.txt +1084 -0
  15. package/mcp-docs/mobile/components/CartesianChart.txt +826 -0
  16. package/mcp-docs/mobile/components/CellMedia.txt +71 -0
  17. package/mcp-docs/mobile/components/Checkbox.txt +246 -0
  18. package/mcp-docs/mobile/components/CheckboxCell.txt +202 -0
  19. package/mcp-docs/mobile/components/CheckboxGroup.txt +285 -0
  20. package/mcp-docs/mobile/components/Chip.txt +195 -0
  21. package/mcp-docs/mobile/components/Coachmark.txt +158 -0
  22. package/mcp-docs/mobile/components/Collapsible.txt +105 -0
  23. package/mcp-docs/mobile/components/ContainedAssetCard.txt +135 -0
  24. package/mcp-docs/mobile/components/ContentCard.txt +366 -0
  25. package/mcp-docs/mobile/components/ContentCardBody.txt +136 -0
  26. package/mcp-docs/mobile/components/ContentCardFooter.txt +128 -0
  27. package/mcp-docs/mobile/components/ContentCardHeader.txt +146 -0
  28. package/mcp-docs/mobile/components/ContentCell.txt +227 -0
  29. package/mcp-docs/mobile/components/ControlGroup.txt +444 -0
  30. package/mcp-docs/mobile/components/DatePicker.txt +497 -0
  31. package/mcp-docs/mobile/components/Divider.txt +139 -0
  32. package/mcp-docs/mobile/components/DotCount.txt +146 -0
  33. package/mcp-docs/mobile/components/DotStatusColor.txt +59 -0
  34. package/mcp-docs/mobile/components/DotSymbol.txt +135 -0
  35. package/mcp-docs/mobile/components/Fallback.txt +158 -0
  36. package/mcp-docs/mobile/components/FloatingAssetCard.txt +156 -0
  37. package/mcp-docs/mobile/components/HStack.txt +235 -0
  38. package/mcp-docs/mobile/components/HeroSquare.txt +48 -0
  39. package/mcp-docs/mobile/components/Icon.txt +52 -0
  40. package/mcp-docs/mobile/components/IconButton.txt +269 -0
  41. package/mcp-docs/mobile/components/InputChip.txt +188 -0
  42. package/mcp-docs/mobile/components/Interactable.txt +187 -0
  43. package/mcp-docs/mobile/components/LineChart.txt +1325 -0
  44. package/mcp-docs/mobile/components/Link.txt +292 -0
  45. package/mcp-docs/mobile/components/ListCell.txt +391 -0
  46. package/mcp-docs/mobile/components/LogoMark.txt +85 -0
  47. package/mcp-docs/mobile/components/LogoWordMark.txt +94 -0
  48. package/mcp-docs/mobile/components/Lottie.txt +139 -0
  49. package/mcp-docs/mobile/components/LottieStatusAnimation.txt +47 -0
  50. package/mcp-docs/mobile/components/Modal.txt +84 -0
  51. package/mcp-docs/mobile/components/ModalBody.txt +34 -0
  52. package/mcp-docs/mobile/components/ModalFooter.txt +25 -0
  53. package/mcp-docs/mobile/components/ModalHeader.txt +28 -0
  54. package/mcp-docs/mobile/components/MultiContentModule.txt +380 -0
  55. package/mcp-docs/mobile/components/NavigationTitle.txt +132 -0
  56. package/mcp-docs/mobile/components/NavigationTitleSelect.txt +142 -0
  57. package/mcp-docs/mobile/components/NudgeCard.txt +90 -0
  58. package/mcp-docs/mobile/components/Numpad.txt +341 -0
  59. package/mcp-docs/mobile/components/Overlay.txt +152 -0
  60. package/mcp-docs/mobile/components/PageFooter.txt +161 -0
  61. package/mcp-docs/mobile/components/PageHeader.txt +186 -0
  62. package/mcp-docs/mobile/components/PeriodSelector.txt +408 -0
  63. package/mcp-docs/mobile/components/Pictogram.txt +48 -0
  64. package/mcp-docs/mobile/components/Point.txt +205 -0
  65. package/mcp-docs/mobile/components/PortalProvider.txt +79 -0
  66. package/mcp-docs/mobile/components/Pressable.txt +211 -0
  67. package/mcp-docs/mobile/components/ProgressBar.txt +130 -0
  68. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +161 -0
  69. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +138 -0
  70. package/mcp-docs/mobile/components/ProgressCircle.txt +237 -0
  71. package/mcp-docs/mobile/components/Radio.txt +242 -0
  72. package/mcp-docs/mobile/components/RadioCell.txt +202 -0
  73. package/mcp-docs/mobile/components/RadioGroup.txt +282 -0
  74. package/mcp-docs/mobile/components/ReferenceLine.txt +153 -0
  75. package/mcp-docs/mobile/components/RemoteImage.txt +106 -0
  76. package/mcp-docs/mobile/components/RemoteImageGroup.txt +61 -0
  77. package/mcp-docs/mobile/components/RollingNumber.txt +789 -0
  78. package/mcp-docs/mobile/components/Scrubber.txt +204 -0
  79. package/mcp-docs/mobile/components/SearchInput.txt +192 -0
  80. package/mcp-docs/mobile/components/SectionHeader.txt +205 -0
  81. package/mcp-docs/mobile/components/SegmentedTabs.txt +316 -0
  82. package/mcp-docs/mobile/components/Select.txt +212 -0
  83. package/mcp-docs/mobile/components/SelectChip.txt +324 -0
  84. package/mcp-docs/mobile/components/SelectOption.txt +85 -0
  85. package/mcp-docs/mobile/components/SlideButton.txt +331 -0
  86. package/mcp-docs/mobile/components/Spacer.txt +84 -0
  87. package/mcp-docs/mobile/components/Sparkline.txt +123 -0
  88. package/mcp-docs/mobile/components/SparklineGradient.txt +107 -0
  89. package/mcp-docs/mobile/components/SparklineInteractive.txt +157 -0
  90. package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +73 -0
  91. package/mcp-docs/mobile/components/Spinner.txt +49 -0
  92. package/mcp-docs/mobile/components/SpotIcon.txt +48 -0
  93. package/mcp-docs/mobile/components/SpotRectangle.txt +48 -0
  94. package/mcp-docs/mobile/components/SpotSquare.txt +48 -0
  95. package/mcp-docs/mobile/components/Stepper.txt +528 -0
  96. package/mcp-docs/mobile/components/SubBrandLogoMark.txt +126 -0
  97. package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +126 -0
  98. package/mcp-docs/mobile/components/Switch.txt +98 -0
  99. package/mcp-docs/mobile/components/TabIndicator.txt +49 -0
  100. package/mcp-docs/mobile/components/TabLabel.txt +154 -0
  101. package/mcp-docs/mobile/components/TabNavigation.txt +147 -0
  102. package/mcp-docs/mobile/components/TabbedChips.txt +143 -0
  103. package/mcp-docs/mobile/components/Tabs.txt +191 -0
  104. package/mcp-docs/mobile/components/Tag.txt +301 -0
  105. package/mcp-docs/mobile/components/Text.txt +212 -0
  106. package/mcp-docs/mobile/components/TextInput.txt +718 -0
  107. package/mcp-docs/mobile/components/ThemeProvider.txt +133 -0
  108. package/mcp-docs/mobile/components/Toast.txt +197 -0
  109. package/mcp-docs/mobile/components/Tooltip.txt +60 -0
  110. package/mcp-docs/mobile/components/TopNavBar.txt +162 -0
  111. package/mcp-docs/mobile/components/Tour.txt +159 -0
  112. package/mcp-docs/mobile/components/Tray.txt +253 -0
  113. package/mcp-docs/mobile/components/UpsellCard.txt +322 -0
  114. package/mcp-docs/mobile/components/VStack.txt +223 -0
  115. package/mcp-docs/mobile/components/XAxis.txt +622 -0
  116. package/mcp-docs/mobile/components/YAxis.txt +568 -0
  117. package/mcp-docs/mobile/getting-started/introduction.txt +99 -0
  118. package/mcp-docs/mobile/getting-started/mcp-server.txt +94 -0
  119. package/mcp-docs/mobile/getting-started/playground.txt +25 -0
  120. package/mcp-docs/mobile/hooks/useDimensions.txt +47 -0
  121. package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +215 -0
  122. package/mcp-docs/mobile/hooks/useTheme.txt +110 -0
  123. package/mcp-docs/mobile/routes.txt +132 -0
  124. package/mcp-docs/web/components/Accordion.txt +190 -0
  125. package/mcp-docs/web/components/AccordionItem.txt +32 -0
  126. package/mcp-docs/web/components/Alert.txt +165 -0
  127. package/mcp-docs/web/components/AreaChart.txt +511 -0
  128. package/mcp-docs/web/components/Avatar.txt +212 -0
  129. package/mcp-docs/web/components/AvatarButton.txt +241 -0
  130. package/mcp-docs/web/components/Banner.txt +227 -0
  131. package/mcp-docs/web/components/BarChart.txt +1268 -0
  132. package/mcp-docs/web/components/Box.txt +176 -0
  133. package/mcp-docs/web/components/Button.txt +213 -0
  134. package/mcp-docs/web/components/ButtonGroup.txt +80 -0
  135. package/mcp-docs/web/components/Calendar.txt +182 -0
  136. package/mcp-docs/web/components/Carousel.txt +1576 -0
  137. package/mcp-docs/web/components/CartesianChart.txt +1045 -0
  138. package/mcp-docs/web/components/CellMedia.txt +57 -0
  139. package/mcp-docs/web/components/Checkbox.txt +189 -0
  140. package/mcp-docs/web/components/CheckboxCell.txt +203 -0
  141. package/mcp-docs/web/components/CheckboxGroup.txt +220 -0
  142. package/mcp-docs/web/components/Chip.txt +197 -0
  143. package/mcp-docs/web/components/Coachmark.txt +189 -0
  144. package/mcp-docs/web/components/Collapsible.txt +120 -0
  145. package/mcp-docs/web/components/ContainedAssetCard.txt +233 -0
  146. package/mcp-docs/web/components/ContentCard.txt +368 -0
  147. package/mcp-docs/web/components/ContentCardBody.txt +138 -0
  148. package/mcp-docs/web/components/ContentCardFooter.txt +130 -0
  149. package/mcp-docs/web/components/ContentCardHeader.txt +148 -0
  150. package/mcp-docs/web/components/ContentCell.txt +220 -0
  151. package/mcp-docs/web/components/ControlGroup.txt +437 -0
  152. package/mcp-docs/web/components/DatePicker.txt +506 -0
  153. package/mcp-docs/web/components/Divider.txt +144 -0
  154. package/mcp-docs/web/components/DotCount.txt +150 -0
  155. package/mcp-docs/web/components/DotStatusColor.txt +59 -0
  156. package/mcp-docs/web/components/DotSymbol.txt +138 -0
  157. package/mcp-docs/web/components/Dropdown.txt +120 -0
  158. package/mcp-docs/web/components/Fallback.txt +164 -0
  159. package/mcp-docs/web/components/FloatingAssetCard.txt +251 -0
  160. package/mcp-docs/web/components/FullscreenAlert.txt +70 -0
  161. package/mcp-docs/web/components/FullscreenModal.txt +146 -0
  162. package/mcp-docs/web/components/FullscreenModalLayout.txt +188 -0
  163. package/mcp-docs/web/components/Grid.txt +237 -0
  164. package/mcp-docs/web/components/GridColumn.txt +210 -0
  165. package/mcp-docs/web/components/HStack.txt +237 -0
  166. package/mcp-docs/web/components/HeroSquare.txt +49 -0
  167. package/mcp-docs/web/components/Icon.txt +146 -0
  168. package/mcp-docs/web/components/IconButton.txt +391 -0
  169. package/mcp-docs/web/components/InputChip.txt +188 -0
  170. package/mcp-docs/web/components/Interactable.txt +194 -0
  171. package/mcp-docs/web/components/LineChart.txt +1577 -0
  172. package/mcp-docs/web/components/Link.txt +244 -0
  173. package/mcp-docs/web/components/ListCell.txt +397 -0
  174. package/mcp-docs/web/components/LogoMark.txt +85 -0
  175. package/mcp-docs/web/components/LogoWordMark.txt +94 -0
  176. package/mcp-docs/web/components/Lottie.txt +158 -0
  177. package/mcp-docs/web/components/LottieStatusAnimation.txt +58 -0
  178. package/mcp-docs/web/components/MediaQueryProvider.txt +109 -0
  179. package/mcp-docs/web/components/Modal.txt +193 -0
  180. package/mcp-docs/web/components/ModalBody.txt +118 -0
  181. package/mcp-docs/web/components/ModalFooter.txt +120 -0
  182. package/mcp-docs/web/components/ModalHeader.txt +124 -0
  183. package/mcp-docs/web/components/MultiContentModule.txt +382 -0
  184. package/mcp-docs/web/components/NavigationBar.txt +103 -0
  185. package/mcp-docs/web/components/NavigationTitle.txt +26 -0
  186. package/mcp-docs/web/components/NavigationTitleSelect.txt +46 -0
  187. package/mcp-docs/web/components/NudgeCard.txt +182 -0
  188. package/mcp-docs/web/components/Overlay.txt +172 -0
  189. package/mcp-docs/web/components/PageFooter.txt +185 -0
  190. package/mcp-docs/web/components/PageHeader.txt +244 -0
  191. package/mcp-docs/web/components/Pagination.txt +500 -0
  192. package/mcp-docs/web/components/PeriodSelector.txt +704 -0
  193. package/mcp-docs/web/components/Pictogram.txt +49 -0
  194. package/mcp-docs/web/components/Point.txt +461 -0
  195. package/mcp-docs/web/components/PortalProvider.txt +77 -0
  196. package/mcp-docs/web/components/Pressable.txt +194 -0
  197. package/mcp-docs/web/components/ProgressBar.txt +164 -0
  198. package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +213 -0
  199. package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +182 -0
  200. package/mcp-docs/web/components/ProgressCircle.txt +444 -0
  201. package/mcp-docs/web/components/Radio.txt +220 -0
  202. package/mcp-docs/web/components/RadioCell.txt +216 -0
  203. package/mcp-docs/web/components/RadioGroup.txt +289 -0
  204. package/mcp-docs/web/components/ReferenceLine.txt +452 -0
  205. package/mcp-docs/web/components/RemoteImage.txt +166 -0
  206. package/mcp-docs/web/components/RemoteImageGroup.txt +87 -0
  207. package/mcp-docs/web/components/RollingNumber.txt +1022 -0
  208. package/mcp-docs/web/components/Scrubber.txt +232 -0
  209. package/mcp-docs/web/components/SearchInput.txt +118 -0
  210. package/mcp-docs/web/components/SectionHeader.txt +218 -0
  211. package/mcp-docs/web/components/SegmentedTabs.txt +325 -0
  212. package/mcp-docs/web/components/Select.txt +225 -0
  213. package/mcp-docs/web/components/SelectChip.txt +315 -0
  214. package/mcp-docs/web/components/SelectOption.txt +166 -0
  215. package/mcp-docs/web/components/Sidebar.txt +350 -0
  216. package/mcp-docs/web/components/SidebarItem.txt +132 -0
  217. package/mcp-docs/web/components/SidebarMoreMenu.txt +31 -0
  218. package/mcp-docs/web/components/Spacer.txt +174 -0
  219. package/mcp-docs/web/components/Sparkline.txt +123 -0
  220. package/mcp-docs/web/components/SparklineGradient.txt +107 -0
  221. package/mcp-docs/web/components/SparklineInteractive.txt +154 -0
  222. package/mcp-docs/web/components/SparklineInteractiveHeader.txt +77 -0
  223. package/mcp-docs/web/components/Spinner.txt +129 -0
  224. package/mcp-docs/web/components/SpotIcon.txt +49 -0
  225. package/mcp-docs/web/components/SpotRectangle.txt +49 -0
  226. package/mcp-docs/web/components/SpotSquare.txt +49 -0
  227. package/mcp-docs/web/components/Stepper.txt +683 -0
  228. package/mcp-docs/web/components/SubBrandLogoMark.txt +126 -0
  229. package/mcp-docs/web/components/SubBrandLogoWordMark.txt +126 -0
  230. package/mcp-docs/web/components/Switch.txt +86 -0
  231. package/mcp-docs/web/components/TabIndicator.txt +49 -0
  232. package/mcp-docs/web/components/TabLabel.txt +159 -0
  233. package/mcp-docs/web/components/TabNavigation.txt +160 -0
  234. package/mcp-docs/web/components/TabbedChips.txt +156 -0
  235. package/mcp-docs/web/components/Table.txt +368 -0
  236. package/mcp-docs/web/components/TableBody.txt +84 -0
  237. package/mcp-docs/web/components/TableCaption.txt +103 -0
  238. package/mcp-docs/web/components/TableCell.txt +166 -0
  239. package/mcp-docs/web/components/TableCellFallback.txt +98 -0
  240. package/mcp-docs/web/components/TableFooter.txt +84 -0
  241. package/mcp-docs/web/components/TableHeader.txt +101 -0
  242. package/mcp-docs/web/components/TableRow.txt +141 -0
  243. package/mcp-docs/web/components/Tabs.txt +213 -0
  244. package/mcp-docs/web/components/Tag.txt +305 -0
  245. package/mcp-docs/web/components/Text.txt +233 -0
  246. package/mcp-docs/web/components/TextInput.txt +653 -0
  247. package/mcp-docs/web/components/ThemeProvider.txt +200 -0
  248. package/mcp-docs/web/components/TileButton.txt +159 -0
  249. package/mcp-docs/web/components/Toast.txt +204 -0
  250. package/mcp-docs/web/components/Tooltip.txt +90 -0
  251. package/mcp-docs/web/components/Tour.txt +180 -0
  252. package/mcp-docs/web/components/Tray.txt +289 -0
  253. package/mcp-docs/web/components/UpsellCard.txt +320 -0
  254. package/mcp-docs/web/components/VStack.txt +225 -0
  255. package/mcp-docs/web/components/XAxis.txt +620 -0
  256. package/mcp-docs/web/components/YAxis.txt +549 -0
  257. package/mcp-docs/web/getting-started/introduction.txt +99 -0
  258. package/mcp-docs/web/getting-started/mcp-server.txt +94 -0
  259. package/mcp-docs/web/getting-started/playground.txt +25 -0
  260. package/mcp-docs/web/hooks/useBreakpoints.txt +33 -0
  261. package/mcp-docs/web/hooks/useDimensions.txt +55 -0
  262. package/mcp-docs/web/hooks/useHasMounted.txt +55 -0
  263. package/mcp-docs/web/hooks/useIsoEffect.txt +42 -0
  264. package/mcp-docs/web/hooks/useMediaQuery.txt +94 -0
  265. package/mcp-docs/web/hooks/useOverlayContentContext.txt +217 -0
  266. package/mcp-docs/web/hooks/useScrollBlocker.txt +63 -0
  267. package/mcp-docs/web/hooks/useTheme.txt +105 -0
  268. package/mcp-docs/web/routes.txt +155 -0
  269. package/package.json +1 -1
@@ -0,0 +1,316 @@
1
+ # SegmentedTabs
2
+
3
+ Switches between different views of content.
4
+
5
+ ## Import
6
+
7
+ ```jsx
8
+ import { SegmentedTabs } from '@coinbase/cds-mobile/tabs/SegmentedTabs'
9
+ ```
10
+
11
+ ## Props
12
+
13
+ | Prop | Type | Required | Default | Description |
14
+ | --- | --- | --- | --- | --- |
15
+ | `activeTab` | `TabValue<T> \| null` | Yes | `-` | React state for the currently active tab. Setting it to null results in no active tab. |
16
+ | `onChange` | `(activeTab: TabValue<T> \| null) => void` | Yes | `-` | Callback that is fired when the active tab changes. Use this callback to update the activeTab state. |
17
+ | `tabs` | `(TabValue<T> & { Component?: TabComponent<T> \| undefined; })[]` | Yes | `-` | The array of tabs data. Each tab may optionally define a custom Component to render. |
18
+ | `TabComponent` | `TabComponent<T>` | No | `-` | The default Component to render each tab. |
19
+ | `TabsActiveIndicatorComponent` | `TabsActiveIndicatorComponent` | No | `-` | The default Component to render the tabs active indicator. |
20
+ | `activeBackground` | `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 passed to the TabsActiveIndicatorComponent. |
21
+ | `alignContent` | `flex-start \| flex-end \| center \| stretch \| space-between \| space-around \| space-evenly` | No | `-` | - |
22
+ | `alignItems` | `flex-start \| flex-end \| center \| stretch \| baseline` | No | `-` | - |
23
+ | `alignSelf` | `auto \| FlexAlignType` | No | `-` | - |
24
+ | `animated` | `boolean` | No | `-` | - |
25
+ | `aspectRatio` | `string \| number` | No | `-` | - |
26
+ | `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 | `-` | - |
27
+ | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
28
+ | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
29
+ | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
30
+ | `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 | `-` | - |
31
+ | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
32
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
33
+ | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
34
+ | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
35
+ | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
36
+ | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
37
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
38
+ | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
39
+ | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
40
+ | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
41
+ | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
42
+ | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
43
+ | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
44
+ | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
45
+ | `bottom` | `string \| number` | No | `-` | - |
46
+ | `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 | `-` | - |
47
+ | `columnGap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
48
+ | `dangerouslySetBackground` | `string` | No | `-` | - |
49
+ | `disabled` | `boolean` | No | `-` | Disable interactions on all the tabs. |
50
+ | `display` | `flex \| none` | No | `-` | - |
51
+ | `elevation` | `0 \| 1 \| 2` | No | `-` | Determines box shadow styles. Parent should have overflow set to visible to ensure styles are not clipped. |
52
+ | `flexBasis` | `string \| number` | No | `-` | - |
53
+ | `flexDirection` | `row \| column \| row-reverse \| column-reverse` | No | `-` | - |
54
+ | `flexGrow` | `number` | No | `-` | - |
55
+ | `flexShrink` | `number` | No | `-` | - |
56
+ | `flexWrap` | `wrap \| nowrap \| wrap-reverse` | No | `-` | - |
57
+ | `font` | `inherit \| FontFamily` | No | `-` | - |
58
+ | `fontFamily` | `inherit \| FontFamily` | No | `-` | - |
59
+ | `fontSize` | `inherit \| FontSize` | No | `-` | - |
60
+ | `fontWeight` | `inherit \| FontWeight` | No | `-` | - |
61
+ | `gap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
62
+ | `height` | `string \| number` | No | `-` | - |
63
+ | `justifyContent` | `flex-start \| flex-end \| center \| space-between \| space-around \| space-evenly` | No | `-` | - |
64
+ | `left` | `string \| number` | No | `-` | - |
65
+ | `lineHeight` | `inherit \| LineHeight` | No | `-` | - |
66
+ | `margin` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
67
+ | `marginBottom` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
68
+ | `marginEnd` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
69
+ | `marginStart` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
70
+ | `marginTop` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
71
+ | `marginX` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
72
+ | `marginY` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
73
+ | `maxHeight` | `string \| number` | No | `-` | - |
74
+ | `maxWidth` | `string \| number` | No | `-` | - |
75
+ | `minHeight` | `string \| number` | No | `-` | - |
76
+ | `minWidth` | `string \| number` | No | `-` | - |
77
+ | `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
78
+ | `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
79
+ | `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
80
+ | `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
81
+ | `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
82
+ | `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
83
+ | `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
84
+ | `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
85
+ | `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
86
+ | `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
87
+ | `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
88
+ | `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
89
+ | `opacity` | `number \| AnimatedNode` | No | `-` | - |
90
+ | `overflow` | `visible \| hidden \| scroll` | No | `-` | - |
91
+ | `padding` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
92
+ | `paddingBottom` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
93
+ | `paddingEnd` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
94
+ | `paddingStart` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
95
+ | `paddingTop` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
96
+ | `paddingX` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
97
+ | `paddingY` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
98
+ | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
99
+ | `position` | `absolute \| relative \| static \| fixed \| sticky` | No | `-` | - |
100
+ | `ref` | `null \| (instance: View \| null) => void \| MutableRefObject<View \| null>` | No | `-` | - |
101
+ | `right` | `string \| number` | No | `-` | - |
102
+ | `rowGap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
103
+ | `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 | `-` | - |
104
+ | `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. |
105
+ | `textAlign` | `left \| right \| auto \| center \| justify` | No | `-` | - |
106
+ | `textDecorationLine` | `none \| underline \| line-through \| underline line-through` | No | `-` | - |
107
+ | `textDecorationStyle` | `solid \| dotted \| dashed \| double` | No | `-` | - |
108
+ | `textTransform` | `none \| capitalize \| uppercase \| lowercase` | No | `-` | - |
109
+ | `top` | `string \| number` | No | `-` | - |
110
+ | `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 | `-` | - |
111
+ | `userSelect` | `none \| auto \| contain \| text \| all` | No | `-` | - |
112
+ | `width` | `string \| number` | No | `-` | - |
113
+ | `zIndex` | `number` | No | `-` | - |
114
+
115
+
116
+ ## Examples
117
+
118
+ ### Basic Example
119
+
120
+ Use the `onChange` prop to listen and make changes to the `activeTab` state.
121
+
122
+ ```jsx
123
+ function Example() {
124
+ const tabs = [
125
+ { id: 'buy', label: 'Buy' },
126
+ { id: 'sell', label: 'Sell' },
127
+ { id: 'convert', label: 'Convert' },
128
+ ];
129
+ const [activeTab, updateActiveTab] = useState(tabs[0]);
130
+ const handleChange = useCallback((activeTab) => updateActiveTab(activeTab), []);
131
+ return (
132
+ <SegmentedTabs
133
+ accessibilityLabel="Switch token action views"
134
+ activeTab={activeTab}
135
+ onChange={handleChange}
136
+ tabs={tabs}
137
+ />
138
+ );
139
+ }
140
+ ```
141
+
142
+ ### With Initial Value
143
+
144
+ You can set any tab as the initial active tab.
145
+
146
+ ```jsx
147
+ function Example() {
148
+ const tabs = [
149
+ { id: 'buy', label: 'Buy' },
150
+ { id: 'sell', label: 'Sell' },
151
+ { id: 'convert', label: 'Convert' },
152
+ ];
153
+ const [activeTab, updateActiveTab] = useState(tabs[1]); // Start with 'Sell'
154
+ const handleChange = useCallback((activeTab) => updateActiveTab(activeTab), []);
155
+ return (
156
+ <SegmentedTabs
157
+ accessibilityLabel="Switch token action views"
158
+ activeTab={activeTab}
159
+ onChange={handleChange}
160
+ tabs={tabs}
161
+ />
162
+ );
163
+ }
164
+ ```
165
+
166
+ ### No Initial Value
167
+
168
+ SegmentedTabs can start with no active selection.
169
+
170
+ ```jsx
171
+ function Example() {
172
+ const tabs = [
173
+ { id: 'buy', label: 'Buy' },
174
+ { id: 'sell', label: 'Sell' },
175
+ { id: 'convert', label: 'Convert' },
176
+ ];
177
+ const [activeTab, updateActiveTab] = useState(null); // No initial selection
178
+ const handleChange = useCallback((activeTab) => updateActiveTab(activeTab), []);
179
+ return (
180
+ <SegmentedTabs
181
+ accessibilityLabel="Switch token action views"
182
+ activeTab={activeTab}
183
+ onChange={handleChange}
184
+ tabs={tabs}
185
+ />
186
+ );
187
+ }
188
+ ```
189
+
190
+ ### Disabled State
191
+
192
+ You can disable the entire SegmentedTabs component.
193
+
194
+ ```jsx
195
+ function Example() {
196
+ const tabs = [
197
+ { id: 'buy', label: 'Buy' },
198
+ { id: 'sell', label: 'Sell' },
199
+ { id: 'convert', label: 'Convert' },
200
+ ];
201
+ const [activeTab, updateActiveTab] = useState(tabs[0]);
202
+ const handleChange = useCallback((activeTab) => updateActiveTab(activeTab), []);
203
+ return (
204
+ <SegmentedTabs
205
+ accessibilityLabel="Switch token action views"
206
+ activeTab={activeTab}
207
+ disabled
208
+ onChange={handleChange}
209
+ tabs={tabs}
210
+ />
211
+ );
212
+ }
213
+ ```
214
+
215
+ ### Disabled Individual Tab
216
+
217
+ Individual tabs can be disabled while keeping others interactive.
218
+
219
+ ```jsx
220
+ function Example() {
221
+ const tabs = [
222
+ { id: 'buy', label: 'Buy' },
223
+ { id: 'sell', label: 'Sell', disabled: true },
224
+ { id: 'convert', label: 'Convert' },
225
+ ];
226
+ const [activeTab, updateActiveTab] = useState(tabs[0]);
227
+ const handleChange = useCallback((activeTab) => updateActiveTab(activeTab), []);
228
+ return (
229
+ <SegmentedTabs
230
+ accessibilityLabel="Switch token action views"
231
+ activeTab={activeTab}
232
+ onChange={handleChange}
233
+ tabs={tabs}
234
+ />
235
+ );
236
+ }
237
+ ```
238
+
239
+ ### Custom Tab Component
240
+
241
+ You can customize individual tabs by providing a custom `Component` for specific tabs.
242
+
243
+ ```jsx
244
+ function Example() {
245
+ const CustomSegmentedTabColor = useCallback(
246
+ (props) => <SegmentedTab {...props} activeColor="fgWarning" color="bgPrimary" font="label2" />,
247
+ [],
248
+ );
249
+
250
+ const CustomSegmentedTabFont = useCallback(
251
+ (props) => <SegmentedTab {...props} font="label2" />,
252
+ [],
253
+ );
254
+
255
+ const tabs = [
256
+ { id: 'buy', label: 'Buy', Component: CustomSegmentedTabColor },
257
+ { id: 'sell', label: 'Sell', Component: CustomSegmentedTabFont },
258
+ { id: 'convert', label: 'Convert', Component: CustomSegmentedTabColor },
259
+ ];
260
+ const [activeTab, updateActiveTab] = useState(tabs[0]);
261
+ const handleChange = useCallback((activeTab) => updateActiveTab(activeTab), []);
262
+ return (
263
+ <SegmentedTabs
264
+ accessibilityLabel="Switch token action views"
265
+ activeTab={activeTab}
266
+ onChange={handleChange}
267
+ tabs={tabs}
268
+ />
269
+ );
270
+ }
271
+ ```
272
+
273
+ ### Custom Active Indicator
274
+
275
+ You can customize the active indicator component and overall styling.
276
+
277
+ ```jsx
278
+ function Example() {
279
+ const CustomActiveIndicator = ({ activeTabRect }) => (
280
+ <TabsActiveIndicator activeTabRect={activeTabRect} background="bgOverlay" />
281
+ );
282
+
283
+ const AnotherCustomSegmentedTab = ({ id, label, disabled }) => {
284
+ const { activeTab } = useTabsContext();
285
+ const isActive = activeTab?.id === id;
286
+ const renderedLabel = (
287
+ <Text color={isActive ? 'fgPositive' : 'fgNegative'} font="label2">
288
+ {label}
289
+ </Text>
290
+ );
291
+
292
+ return <SegmentedTab disabled={disabled} id={id} label={renderedLabel} />;
293
+ };
294
+
295
+ const tabs = [
296
+ { id: 'buy', label: 'Buy' },
297
+ { id: 'sell', label: 'Sell' },
298
+ { id: 'convert', label: 'Convert' },
299
+ ];
300
+ const [activeTab, updateActiveTab] = useState(tabs[0]);
301
+ const handleChange = useCallback((activeTab) => updateActiveTab(activeTab), []);
302
+ return (
303
+ <SegmentedTabs
304
+ accessibilityLabel="Switch token action views"
305
+ activeTab={activeTab}
306
+ borderRadius={0}
307
+ onChange={handleChange}
308
+ tabs={tabs}
309
+ TabComponent={AnotherCustomSegmentedTab}
310
+ TabsActiveIndicatorComponent={CustomActiveIndicator}
311
+ />
312
+ );
313
+ }
314
+ ```
315
+
316
+
@@ -0,0 +1,212 @@
1
+ # Select
2
+
3
+ A control for selecting from a list of options.
4
+
5
+ ## Import
6
+
7
+ ```jsx
8
+ import { Select } from '@coinbase/cds-mobile/controls/Select'
9
+ ```
10
+
11
+ ## Props
12
+
13
+ | Prop | Type | Required | Default | Description |
14
+ | --- | --- | --- | --- | --- |
15
+ | `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). |
16
+ | `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'` | - |
17
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `1000` | - |
18
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
19
+ | `checked` | `boolean` | No | `-` | Set the control to selected/on. |
20
+ | `children` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Label for the control option. |
21
+ | `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` | - |
22
+ | `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. |
23
+ | `disabled` | `boolean` | No | `-` | Disable user interaction. |
24
+ | `indeterminate` | `boolean` | No | `-` | Enable indeterminate state. Useful when you want to indicate that sub-items of a control are partially filled. |
25
+ | `onChange` | `((value: T, checked?: boolean \| undefined) => void) \| undefined` | No | `-` | Toggle control selected state. |
26
+ | `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
27
+ | `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
28
+ | `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
29
+ | `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
30
+ | `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
31
+ | `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
32
+ | `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
33
+ | `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
34
+ | `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
35
+ | `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
36
+ | `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
37
+ | `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
38
+ | `onPress` | `((event: GestureResponderEvent) => void) \| null` | No | `-` | Called when a single tap gesture is detected. |
39
+ | `readOnly` | `boolean` | No | `-` | Set the control to ready-only. Similar effect as disabled. |
40
+ | `ref` | `null \| (instance: View \| null) => void \| RefObject<View>` | No | `-` | - |
41
+ | `style` | `ViewStyle` | No | `-` | - |
42
+ | `testID` | `string` | No | `-` | Used to locate this view in end-to-end tests. |
43
+ | `value` | `string` | No | `-` | Value of the option. Useful for multiple choice. |
44
+
45
+
46
+ ## Examples
47
+
48
+ ### Default Composition
49
+
50
+ The mobile version of `Select` is quite different from web; where on mobile, `Select` is just the trigger to toggle the visibility of a `Menu` that is contained in a `Tray`.
51
+
52
+ On mobile, all `SelectOption`s must be wrapped in a `Menu`. Think of it as a controlled `Select` on web, where you pass it the `value` and `onChange` handler.
53
+
54
+ ```jsx
55
+ const SelectMobile = () => {
56
+ const [isTrayVisible, { toggleOff: handleClose, toggleOn: handleOpenTray }] = useToggler(false);
57
+ const [value, setValue] = useState();
58
+ const trayRef = useRef(undefined);
59
+
60
+ const options = ['Option 1', 'Option 2', 'Option 3', 'Option 4', 'Option 5'];
61
+
62
+ const handleOptionPress = () => {
63
+ trayRef.current?.handleClose();
64
+ };
65
+
66
+ return (
67
+ <>
68
+ <Select value={value} onPress={handleOpenTray} />
69
+ {isTrayVisible && (
70
+ <Tray title={title} onCloseComplete={handleClose} ref={trayRef}>
71
+ {/* You must wrap options in Menu. Treat it as a Select on web */}
72
+ <Menu value={value} onChange={setValue}>
73
+ {options.map((option: string) => (
74
+ <SelectOption
75
+ key={option}
76
+ title={option}
77
+ description="BTC"
78
+ onPress={handleOptionPress}
79
+ value={option}
80
+ />
81
+ ))}
82
+ </Menu>
83
+ </Tray>
84
+ )}
85
+ </>
86
+ );
87
+ };
88
+ ```
89
+
90
+ ### Value/Label Object Model
91
+
92
+ Sometimes you may want to surface a label instead of the select value. You can pass a `valueLabel` prop with the currently selected value's corresponding label, which will appear to be the value of the Select.
93
+
94
+ ```jsx
95
+ const SelectWithValueLabel = () => {
96
+ const [value, setValue] = useState();
97
+ const options = [
98
+ { value: '1', label: 'Option 1' },
99
+ { value: '2', label: 'Option 2' },
100
+ { value: '3', label: 'Option 3' },
101
+ { value: '4', label: 'Option 4' },
102
+ ];
103
+ const selectedValueLabel = value && options.find((option) => option.value === value).label;
104
+
105
+ return (
106
+ <>
107
+ <Select
108
+ value={value}
109
+ valueLabel={selectedValueLabel}
110
+ placeholder="Choose something..."
111
+ onPress={handleOpenTray}
112
+ />
113
+ {isTrayVisible && (
114
+ <Tray title="Select Option" onCloseComplete={handleClose} ref={trayRef}>
115
+ <Menu value={value} onChange={setValue}>
116
+ {options.map((option) => (
117
+ <SelectOption
118
+ key={option.value}
119
+ title={option.label}
120
+ description="Description"
121
+ onPress={handleOptionPress}
122
+ value={option.value}
123
+ />
124
+ ))}
125
+ </Menu>
126
+ </Tray>
127
+ )}
128
+ </>
129
+ );
130
+ };
131
+ ```
132
+
133
+ ### Input Stack Options
134
+
135
+ The `Select` trigger can be customized similar to `TextInput`. These options are also available for mobile implementations.
136
+
137
+ #### Label and Helper Text
138
+
139
+ You can add a label above the input and helper text below to provide context and guidance to users.
140
+
141
+ ```jsx
142
+ <Select
143
+ label="Make a selection"
144
+ helperText="You can only choose one"
145
+ value={value}
146
+ onChange={setValue}
147
+ startNode={<InputIcon name="calendar" />}
148
+ >
149
+ ...
150
+ </Select>
151
+ ```
152
+
153
+ ### Compact
154
+
155
+ When space is tight, this brings the label inside of the Input. Should be used with a `compact` `SelectOption`.
156
+
157
+ ```jsx
158
+ <Select compact label="Make a selection" value={value} onChange={setValue}>
159
+ ...
160
+ </Select>
161
+ ```
162
+
163
+ ### Variants
164
+
165
+ Variants can be used to surface positive or negative feedback. The available variants are `positive`, `negative`, `primary`, `foreground`, `foregroundMuted`, and `secondary`.
166
+
167
+ ```jsx
168
+ <Select variant="positive" label="Make a selection">
169
+ ...
170
+ </Select>
171
+ ```
172
+
173
+ ### Label Variants
174
+
175
+ Select supports two label variants: `outside` (default) and `inside`. Note that the `compact` prop, when set to true, will override label variant preference.
176
+
177
+ :::warning
178
+
179
+ When using the `inside` label variant, you should always include a `placeholder` prop.
180
+
181
+ :::
182
+
183
+ #### Outside label (default)
184
+
185
+ ```jsx
186
+ <Select label="Choose Option" placeholder="Select from list">
187
+ ...
188
+ </Select>
189
+ ```
190
+
191
+ #### Inside label
192
+
193
+ ```jsx
194
+ <Select label="Choose Option" labelVariant="inside" placeholder="Select from list">
195
+ ...
196
+ </Select>
197
+ ```
198
+
199
+ #### Inside label (with start content)
200
+
201
+ ```jsx
202
+ <Select
203
+ label="Filter Options"
204
+ labelVariant="inside"
205
+ startNode={<InputIcon name="search" />}
206
+ placeholder="Search and select"
207
+ >
208
+ ...
209
+ </Select>
210
+ ```
211
+
212
+