@coinbase/cds-mcp-server 8.17.2 → 8.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/mcp-docs/mobile/components/Accordion.txt +189 -0
- package/mcp-docs/mobile/components/AccordionItem.txt +30 -0
- package/mcp-docs/mobile/components/Alert.txt +156 -0
- package/mcp-docs/mobile/components/AreaChart.txt +266 -0
- package/mcp-docs/mobile/components/Avatar.txt +196 -0
- package/mcp-docs/mobile/components/AvatarButton.txt +226 -0
- package/mcp-docs/mobile/components/Banner.txt +222 -0
- package/mcp-docs/mobile/components/BarChart.txt +816 -0
- package/mcp-docs/mobile/components/Box.txt +174 -0
- package/mcp-docs/mobile/components/BrowserBar.txt +147 -0
- package/mcp-docs/mobile/components/Button.txt +199 -0
- package/mcp-docs/mobile/components/ButtonGroup.txt +80 -0
- package/mcp-docs/mobile/components/Carousel.txt +1084 -0
- package/mcp-docs/mobile/components/CartesianChart.txt +826 -0
- package/mcp-docs/mobile/components/CellMedia.txt +71 -0
- package/mcp-docs/mobile/components/Checkbox.txt +246 -0
- package/mcp-docs/mobile/components/CheckboxCell.txt +202 -0
- package/mcp-docs/mobile/components/CheckboxGroup.txt +285 -0
- package/mcp-docs/mobile/components/Chip.txt +195 -0
- package/mcp-docs/mobile/components/Coachmark.txt +158 -0
- package/mcp-docs/mobile/components/Collapsible.txt +105 -0
- package/mcp-docs/mobile/components/ContainedAssetCard.txt +135 -0
- package/mcp-docs/mobile/components/ContentCard.txt +366 -0
- package/mcp-docs/mobile/components/ContentCardBody.txt +136 -0
- package/mcp-docs/mobile/components/ContentCardFooter.txt +128 -0
- package/mcp-docs/mobile/components/ContentCardHeader.txt +146 -0
- package/mcp-docs/mobile/components/ContentCell.txt +227 -0
- package/mcp-docs/mobile/components/ControlGroup.txt +444 -0
- package/mcp-docs/mobile/components/DatePicker.txt +497 -0
- package/mcp-docs/mobile/components/Divider.txt +139 -0
- package/mcp-docs/mobile/components/DotCount.txt +146 -0
- package/mcp-docs/mobile/components/DotStatusColor.txt +59 -0
- package/mcp-docs/mobile/components/DotSymbol.txt +135 -0
- package/mcp-docs/mobile/components/Fallback.txt +158 -0
- package/mcp-docs/mobile/components/FloatingAssetCard.txt +156 -0
- package/mcp-docs/mobile/components/HStack.txt +235 -0
- package/mcp-docs/mobile/components/HeroSquare.txt +48 -0
- package/mcp-docs/mobile/components/Icon.txt +52 -0
- package/mcp-docs/mobile/components/IconButton.txt +269 -0
- package/mcp-docs/mobile/components/InputChip.txt +188 -0
- package/mcp-docs/mobile/components/Interactable.txt +187 -0
- package/mcp-docs/mobile/components/LineChart.txt +1325 -0
- package/mcp-docs/mobile/components/Link.txt +292 -0
- package/mcp-docs/mobile/components/ListCell.txt +391 -0
- package/mcp-docs/mobile/components/LogoMark.txt +85 -0
- package/mcp-docs/mobile/components/LogoWordMark.txt +94 -0
- package/mcp-docs/mobile/components/Lottie.txt +139 -0
- package/mcp-docs/mobile/components/LottieStatusAnimation.txt +47 -0
- package/mcp-docs/mobile/components/Modal.txt +84 -0
- package/mcp-docs/mobile/components/ModalBody.txt +34 -0
- package/mcp-docs/mobile/components/ModalFooter.txt +25 -0
- package/mcp-docs/mobile/components/ModalHeader.txt +28 -0
- package/mcp-docs/mobile/components/MultiContentModule.txt +380 -0
- package/mcp-docs/mobile/components/NavigationTitle.txt +132 -0
- package/mcp-docs/mobile/components/NavigationTitleSelect.txt +142 -0
- package/mcp-docs/mobile/components/NudgeCard.txt +90 -0
- package/mcp-docs/mobile/components/Numpad.txt +341 -0
- package/mcp-docs/mobile/components/Overlay.txt +152 -0
- package/mcp-docs/mobile/components/PageFooter.txt +161 -0
- package/mcp-docs/mobile/components/PageHeader.txt +186 -0
- package/mcp-docs/mobile/components/PeriodSelector.txt +408 -0
- package/mcp-docs/mobile/components/Pictogram.txt +48 -0
- package/mcp-docs/mobile/components/Point.txt +205 -0
- package/mcp-docs/mobile/components/PortalProvider.txt +79 -0
- package/mcp-docs/mobile/components/Pressable.txt +211 -0
- package/mcp-docs/mobile/components/ProgressBar.txt +130 -0
- package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +161 -0
- package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +138 -0
- package/mcp-docs/mobile/components/ProgressCircle.txt +237 -0
- package/mcp-docs/mobile/components/Radio.txt +242 -0
- package/mcp-docs/mobile/components/RadioCell.txt +202 -0
- package/mcp-docs/mobile/components/RadioGroup.txt +282 -0
- package/mcp-docs/mobile/components/ReferenceLine.txt +153 -0
- package/mcp-docs/mobile/components/RemoteImage.txt +106 -0
- package/mcp-docs/mobile/components/RemoteImageGroup.txt +61 -0
- package/mcp-docs/mobile/components/RollingNumber.txt +789 -0
- package/mcp-docs/mobile/components/Scrubber.txt +204 -0
- package/mcp-docs/mobile/components/SearchInput.txt +192 -0
- package/mcp-docs/mobile/components/SectionHeader.txt +205 -0
- package/mcp-docs/mobile/components/SegmentedTabs.txt +316 -0
- package/mcp-docs/mobile/components/Select.txt +212 -0
- package/mcp-docs/mobile/components/SelectChip.txt +324 -0
- package/mcp-docs/mobile/components/SelectOption.txt +85 -0
- package/mcp-docs/mobile/components/SlideButton.txt +331 -0
- package/mcp-docs/mobile/components/Spacer.txt +84 -0
- package/mcp-docs/mobile/components/Sparkline.txt +123 -0
- package/mcp-docs/mobile/components/SparklineGradient.txt +107 -0
- package/mcp-docs/mobile/components/SparklineInteractive.txt +157 -0
- package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +73 -0
- package/mcp-docs/mobile/components/Spinner.txt +49 -0
- package/mcp-docs/mobile/components/SpotIcon.txt +48 -0
- package/mcp-docs/mobile/components/SpotRectangle.txt +48 -0
- package/mcp-docs/mobile/components/SpotSquare.txt +48 -0
- package/mcp-docs/mobile/components/Stepper.txt +528 -0
- package/mcp-docs/mobile/components/SubBrandLogoMark.txt +126 -0
- package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +126 -0
- package/mcp-docs/mobile/components/Switch.txt +98 -0
- package/mcp-docs/mobile/components/TabIndicator.txt +49 -0
- package/mcp-docs/mobile/components/TabLabel.txt +154 -0
- package/mcp-docs/mobile/components/TabNavigation.txt +147 -0
- package/mcp-docs/mobile/components/TabbedChips.txt +143 -0
- package/mcp-docs/mobile/components/Tabs.txt +191 -0
- package/mcp-docs/mobile/components/Tag.txt +301 -0
- package/mcp-docs/mobile/components/Text.txt +212 -0
- package/mcp-docs/mobile/components/TextInput.txt +718 -0
- package/mcp-docs/mobile/components/ThemeProvider.txt +133 -0
- package/mcp-docs/mobile/components/Toast.txt +197 -0
- package/mcp-docs/mobile/components/Tooltip.txt +60 -0
- package/mcp-docs/mobile/components/TopNavBar.txt +162 -0
- package/mcp-docs/mobile/components/Tour.txt +159 -0
- package/mcp-docs/mobile/components/Tray.txt +253 -0
- package/mcp-docs/mobile/components/UpsellCard.txt +322 -0
- package/mcp-docs/mobile/components/VStack.txt +223 -0
- package/mcp-docs/mobile/components/XAxis.txt +622 -0
- package/mcp-docs/mobile/components/YAxis.txt +568 -0
- package/mcp-docs/mobile/getting-started/introduction.txt +99 -0
- package/mcp-docs/mobile/getting-started/mcp-server.txt +94 -0
- package/mcp-docs/mobile/getting-started/playground.txt +25 -0
- package/mcp-docs/mobile/hooks/useDimensions.txt +47 -0
- package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +215 -0
- package/mcp-docs/mobile/hooks/useTheme.txt +110 -0
- package/mcp-docs/mobile/routes.txt +132 -0
- package/mcp-docs/web/components/Accordion.txt +190 -0
- package/mcp-docs/web/components/AccordionItem.txt +32 -0
- package/mcp-docs/web/components/Alert.txt +165 -0
- package/mcp-docs/web/components/AreaChart.txt +511 -0
- package/mcp-docs/web/components/Avatar.txt +212 -0
- package/mcp-docs/web/components/AvatarButton.txt +241 -0
- package/mcp-docs/web/components/Banner.txt +227 -0
- package/mcp-docs/web/components/BarChart.txt +1268 -0
- package/mcp-docs/web/components/Box.txt +176 -0
- package/mcp-docs/web/components/Button.txt +213 -0
- package/mcp-docs/web/components/ButtonGroup.txt +80 -0
- package/mcp-docs/web/components/Calendar.txt +182 -0
- package/mcp-docs/web/components/Carousel.txt +1576 -0
- package/mcp-docs/web/components/CartesianChart.txt +1045 -0
- package/mcp-docs/web/components/CellMedia.txt +57 -0
- package/mcp-docs/web/components/Checkbox.txt +189 -0
- package/mcp-docs/web/components/CheckboxCell.txt +203 -0
- package/mcp-docs/web/components/CheckboxGroup.txt +220 -0
- package/mcp-docs/web/components/Chip.txt +197 -0
- package/mcp-docs/web/components/Coachmark.txt +189 -0
- package/mcp-docs/web/components/Collapsible.txt +120 -0
- package/mcp-docs/web/components/ContainedAssetCard.txt +233 -0
- package/mcp-docs/web/components/ContentCard.txt +368 -0
- package/mcp-docs/web/components/ContentCardBody.txt +138 -0
- package/mcp-docs/web/components/ContentCardFooter.txt +130 -0
- package/mcp-docs/web/components/ContentCardHeader.txt +148 -0
- package/mcp-docs/web/components/ContentCell.txt +220 -0
- package/mcp-docs/web/components/ControlGroup.txt +437 -0
- package/mcp-docs/web/components/DatePicker.txt +506 -0
- package/mcp-docs/web/components/Divider.txt +144 -0
- package/mcp-docs/web/components/DotCount.txt +150 -0
- package/mcp-docs/web/components/DotStatusColor.txt +59 -0
- package/mcp-docs/web/components/DotSymbol.txt +138 -0
- package/mcp-docs/web/components/Dropdown.txt +120 -0
- package/mcp-docs/web/components/Fallback.txt +164 -0
- package/mcp-docs/web/components/FloatingAssetCard.txt +251 -0
- package/mcp-docs/web/components/FullscreenAlert.txt +70 -0
- package/mcp-docs/web/components/FullscreenModal.txt +146 -0
- package/mcp-docs/web/components/FullscreenModalLayout.txt +188 -0
- package/mcp-docs/web/components/Grid.txt +237 -0
- package/mcp-docs/web/components/GridColumn.txt +210 -0
- package/mcp-docs/web/components/HStack.txt +237 -0
- package/mcp-docs/web/components/HeroSquare.txt +49 -0
- package/mcp-docs/web/components/Icon.txt +146 -0
- package/mcp-docs/web/components/IconButton.txt +391 -0
- package/mcp-docs/web/components/InputChip.txt +188 -0
- package/mcp-docs/web/components/Interactable.txt +194 -0
- package/mcp-docs/web/components/LineChart.txt +1577 -0
- package/mcp-docs/web/components/Link.txt +244 -0
- package/mcp-docs/web/components/ListCell.txt +397 -0
- package/mcp-docs/web/components/LogoMark.txt +85 -0
- package/mcp-docs/web/components/LogoWordMark.txt +94 -0
- package/mcp-docs/web/components/Lottie.txt +158 -0
- package/mcp-docs/web/components/LottieStatusAnimation.txt +58 -0
- package/mcp-docs/web/components/MediaQueryProvider.txt +109 -0
- package/mcp-docs/web/components/Modal.txt +193 -0
- package/mcp-docs/web/components/ModalBody.txt +118 -0
- package/mcp-docs/web/components/ModalFooter.txt +120 -0
- package/mcp-docs/web/components/ModalHeader.txt +124 -0
- package/mcp-docs/web/components/MultiContentModule.txt +382 -0
- package/mcp-docs/web/components/NavigationBar.txt +103 -0
- package/mcp-docs/web/components/NavigationTitle.txt +26 -0
- package/mcp-docs/web/components/NavigationTitleSelect.txt +46 -0
- package/mcp-docs/web/components/NudgeCard.txt +182 -0
- package/mcp-docs/web/components/Overlay.txt +172 -0
- package/mcp-docs/web/components/PageFooter.txt +185 -0
- package/mcp-docs/web/components/PageHeader.txt +244 -0
- package/mcp-docs/web/components/Pagination.txt +500 -0
- package/mcp-docs/web/components/PeriodSelector.txt +704 -0
- package/mcp-docs/web/components/Pictogram.txt +49 -0
- package/mcp-docs/web/components/Point.txt +461 -0
- package/mcp-docs/web/components/PortalProvider.txt +77 -0
- package/mcp-docs/web/components/Pressable.txt +194 -0
- package/mcp-docs/web/components/ProgressBar.txt +164 -0
- package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +213 -0
- package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +182 -0
- package/mcp-docs/web/components/ProgressCircle.txt +444 -0
- package/mcp-docs/web/components/Radio.txt +220 -0
- package/mcp-docs/web/components/RadioCell.txt +216 -0
- package/mcp-docs/web/components/RadioGroup.txt +289 -0
- package/mcp-docs/web/components/ReferenceLine.txt +452 -0
- package/mcp-docs/web/components/RemoteImage.txt +166 -0
- package/mcp-docs/web/components/RemoteImageGroup.txt +87 -0
- package/mcp-docs/web/components/RollingNumber.txt +1022 -0
- package/mcp-docs/web/components/Scrubber.txt +232 -0
- package/mcp-docs/web/components/SearchInput.txt +118 -0
- package/mcp-docs/web/components/SectionHeader.txt +218 -0
- package/mcp-docs/web/components/SegmentedTabs.txt +325 -0
- package/mcp-docs/web/components/Select.txt +225 -0
- package/mcp-docs/web/components/SelectChip.txt +315 -0
- package/mcp-docs/web/components/SelectOption.txt +166 -0
- package/mcp-docs/web/components/Sidebar.txt +350 -0
- package/mcp-docs/web/components/SidebarItem.txt +132 -0
- package/mcp-docs/web/components/SidebarMoreMenu.txt +31 -0
- package/mcp-docs/web/components/Spacer.txt +174 -0
- package/mcp-docs/web/components/Sparkline.txt +123 -0
- package/mcp-docs/web/components/SparklineGradient.txt +107 -0
- package/mcp-docs/web/components/SparklineInteractive.txt +154 -0
- package/mcp-docs/web/components/SparklineInteractiveHeader.txt +77 -0
- package/mcp-docs/web/components/Spinner.txt +129 -0
- package/mcp-docs/web/components/SpotIcon.txt +49 -0
- package/mcp-docs/web/components/SpotRectangle.txt +49 -0
- package/mcp-docs/web/components/SpotSquare.txt +49 -0
- package/mcp-docs/web/components/Stepper.txt +683 -0
- package/mcp-docs/web/components/SubBrandLogoMark.txt +126 -0
- package/mcp-docs/web/components/SubBrandLogoWordMark.txt +126 -0
- package/mcp-docs/web/components/Switch.txt +86 -0
- package/mcp-docs/web/components/TabIndicator.txt +49 -0
- package/mcp-docs/web/components/TabLabel.txt +159 -0
- package/mcp-docs/web/components/TabNavigation.txt +160 -0
- package/mcp-docs/web/components/TabbedChips.txt +156 -0
- package/mcp-docs/web/components/Table.txt +368 -0
- package/mcp-docs/web/components/TableBody.txt +84 -0
- package/mcp-docs/web/components/TableCaption.txt +103 -0
- package/mcp-docs/web/components/TableCell.txt +166 -0
- package/mcp-docs/web/components/TableCellFallback.txt +98 -0
- package/mcp-docs/web/components/TableFooter.txt +84 -0
- package/mcp-docs/web/components/TableHeader.txt +101 -0
- package/mcp-docs/web/components/TableRow.txt +141 -0
- package/mcp-docs/web/components/Tabs.txt +213 -0
- package/mcp-docs/web/components/Tag.txt +305 -0
- package/mcp-docs/web/components/Text.txt +233 -0
- package/mcp-docs/web/components/TextInput.txt +653 -0
- package/mcp-docs/web/components/ThemeProvider.txt +200 -0
- package/mcp-docs/web/components/TileButton.txt +159 -0
- package/mcp-docs/web/components/Toast.txt +204 -0
- package/mcp-docs/web/components/Tooltip.txt +90 -0
- package/mcp-docs/web/components/Tour.txt +180 -0
- package/mcp-docs/web/components/Tray.txt +289 -0
- package/mcp-docs/web/components/UpsellCard.txt +320 -0
- package/mcp-docs/web/components/VStack.txt +225 -0
- package/mcp-docs/web/components/XAxis.txt +620 -0
- package/mcp-docs/web/components/YAxis.txt +549 -0
- package/mcp-docs/web/getting-started/introduction.txt +99 -0
- package/mcp-docs/web/getting-started/mcp-server.txt +94 -0
- package/mcp-docs/web/getting-started/playground.txt +25 -0
- package/mcp-docs/web/hooks/useBreakpoints.txt +33 -0
- package/mcp-docs/web/hooks/useDimensions.txt +55 -0
- package/mcp-docs/web/hooks/useHasMounted.txt +55 -0
- package/mcp-docs/web/hooks/useIsoEffect.txt +42 -0
- package/mcp-docs/web/hooks/useMediaQuery.txt +94 -0
- package/mcp-docs/web/hooks/useOverlayContentContext.txt +217 -0
- package/mcp-docs/web/hooks/useScrollBlocker.txt +63 -0
- package/mcp-docs/web/hooks/useTheme.txt +105 -0
- package/mcp-docs/web/routes.txt +155 -0
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: mcp-server
|
|
3
|
+
title: MCP Server
|
|
4
|
+
hide_title: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import { MDXSection } from '@site/src/components/page/MDXSection';
|
|
8
|
+
import { MDXArticle } from '@site/src/components/page/MDXArticle';
|
|
9
|
+
import { ContentHeader } from '@site/src/components/page/ContentHeader';
|
|
10
|
+
|
|
11
|
+
<ContentHeader
|
|
12
|
+
title="MCP Server"
|
|
13
|
+
description="CDS includes an MCP Server that is automatically updated with each new version of our libraries."
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
<MDXSection>
|
|
17
|
+
<MDXArticle>
|
|
18
|
+
## What is it?
|
|
19
|
+
|
|
20
|
+
The CDS MCP Server provides CDS context to LLMs, allowing AI models to understand and work with CDS APIs and components.
|
|
21
|
+
|
|
22
|
+
From [modelcontextprotocol.io](https://modelcontextprotocol.io/docs/getting-started/intro):
|
|
23
|
+
|
|
24
|
+
> _MCP is an open protocol that standardizes how applications provide context to large language models (LLMs). MCP provides a standardized way to connect AI models to different data sources and tools. MCP enables you build agents and complex workflows on top of LLMs and connects your models with the world._
|
|
25
|
+
|
|
26
|
+
</MDXArticle>
|
|
27
|
+
</MDXSection>
|
|
28
|
+
|
|
29
|
+
<MDXSection>
|
|
30
|
+
<MDXArticle>
|
|
31
|
+
## Basic installation
|
|
32
|
+
|
|
33
|
+
The CDS MCP server is published in the `@coinbase/cds-mcp-server` package.
|
|
34
|
+
|
|
35
|
+
This package is automatically included as a dependency of the CDS libraries, ensuring the CDS library and CDS MCP Server versions match. You do not need to install it separately if you are using the CDS libraries.
|
|
36
|
+
|
|
37
|
+
</MDXArticle>
|
|
38
|
+
<MDXArticle>
|
|
39
|
+
|
|
40
|
+
### First time setup
|
|
41
|
+
|
|
42
|
+
Run the setup command to install the CDS MCP Server for Cursor or Claude Code, then enable the MCP server in your agent.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx --package=@coinbase/cds-mcp-server cds-mcp-setup
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
:::tip
|
|
49
|
+
Make sure to enable the MCP server after installation.<br />
|
|
50
|
+
See the [Cursor docs here](https://cursor.com/docs/context/mcp#using-mcp-in-chat) and the [Claude Code docs here](https://docs.claude.com/en/docs/claude-code/mcp#managing-your-servers) for more information.
|
|
51
|
+
:::
|
|
52
|
+
|
|
53
|
+
</MDXArticle>
|
|
54
|
+
<MDXArticle>
|
|
55
|
+
|
|
56
|
+
### Using the MCP server
|
|
57
|
+
|
|
58
|
+
Once the CDS MCP Server is enabled in your agent, the agent will automatically be able to use the CDS MCP tools to interact with the CDS APIs and components.
|
|
59
|
+
|
|
60
|
+
Try asking a question like "How can I add an icon to a CDS Button?" or "How can I customize the CDS Stepper component behavior?"
|
|
61
|
+
|
|
62
|
+
</MDXArticle>
|
|
63
|
+
</MDXSection>
|
|
64
|
+
|
|
65
|
+
<MDXSection>
|
|
66
|
+
<MDXArticle>
|
|
67
|
+
## Advanced installation
|
|
68
|
+
|
|
69
|
+
To install the MCP server separately as a standalone package and add it as a dependency to your project, run the following command:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm install @coinbase/cds-mcp-server
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Alternatively, if you are using Yarn:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
yarn add @coinbase/cds-mcp-server
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
:::tip
|
|
82
|
+
Avoid installing mismatched versions of the CDS libraries and the CDS MCP Server.
|
|
83
|
+
:::
|
|
84
|
+
|
|
85
|
+
### Executing with npx directly
|
|
86
|
+
|
|
87
|
+
You can also execute the MCP server with npx directly, but it will not have the associated CDS agent rules installed.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx @coinbase/cds-mcp-server
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
</MDXArticle>
|
|
94
|
+
</MDXSection>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: playground
|
|
3
|
+
title: Playground
|
|
4
|
+
hide_title: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import { MDXSection } from '@site/src/components/page/MDXSection';
|
|
8
|
+
import { MDXArticle } from '@site/src/components/page/MDXArticle';
|
|
9
|
+
import { ContentHeader } from '@site/src/components/page/ContentHeader';
|
|
10
|
+
import { PlaygroundBanner } from '@site/src/components/page/ComponentBanner/PlaygroundBanner';
|
|
11
|
+
import { ShareablePlayground } from '@site/src/components/page/ShareablePlayground';
|
|
12
|
+
|
|
13
|
+
<ContentHeader
|
|
14
|
+
title="Playground"
|
|
15
|
+
description="Live code playground for testing and sharing CDS components and code examples. All CDS components and hooks and all React exports are available to use in the playground without importing them. You must call render() to render your code."
|
|
16
|
+
banner={<PlaygroundBanner />}
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
<MDXSection>
|
|
20
|
+
<MDXArticle>
|
|
21
|
+
|
|
22
|
+
<ShareablePlayground />
|
|
23
|
+
|
|
24
|
+
</MDXArticle>
|
|
25
|
+
</MDXSection>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
# useDimensions
|
|
3
|
+
Measures the screen dimensions and status bar height.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { useDimensions } from '@coinbase/cds-mobile/hooks/useDimensions'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Basic usage
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
function Example() {
|
|
17
|
+
const { screenWidth, screenHeight, statusBarHeight } = useDimensions();
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Box backgroundColor="bgAlternate" padding={3} borderRadius={300} width="100%">
|
|
21
|
+
<VStack gap={2}>
|
|
22
|
+
<TextHeadline>
|
|
23
|
+
Screen dimensions: {screenWidth}x{screenHeight}
|
|
24
|
+
</TextHeadline>
|
|
25
|
+
<TextHeadline>Status bar height: {statusBarHeight}px</TextHeadline>
|
|
26
|
+
</VStack>
|
|
27
|
+
</Box>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### With Safe Area Layout
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
function Example() {
|
|
36
|
+
const { screenHeight, statusBarHeight } = useDimensions();
|
|
37
|
+
const contentHeight = screenHeight - statusBarHeight;
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Box backgroundColor="bgAlternate" height={contentHeight} paddingTop={statusBarHeight}>
|
|
41
|
+
<TextHeadline>Content below status bar</TextHeadline>
|
|
42
|
+
</Box>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
|
|
2
|
+
# useOverlayContentContext
|
|
3
|
+
A React context and hook for detecting if components are rendered inside overlay containers like modals, drawers, tours, and trays.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { OverlayContentContext, useOverlayContentContext } from '@coinbase/cds-common/overlays/OverlayContentContext'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
The `useOverlayContentContext` hook provides information about whether a component is rendered inside various types of overlay containers on mobile. This is useful for conditional rendering and behavior based on the overlay context.
|
|
14
|
+
|
|
15
|
+
### Basic usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
function ExampleComponent() {
|
|
19
|
+
const { isOverlay, isModal, isDrawer, isTour } = useOverlayContentContext();
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<VStack gap={2}>
|
|
23
|
+
<Text variant="title3">Overlay Context Information</Text>
|
|
24
|
+
<Text>Is inside any overlay: {isOverlay ? 'Yes' : 'No'}</Text>
|
|
25
|
+
<Text>Is inside modal: {isModal ? 'Yes' : 'No'}</Text>
|
|
26
|
+
<Text>Is inside drawer/tray: {isDrawer ? 'Yes' : 'No'}</Text>
|
|
27
|
+
<Text>Is inside tour: {isTour ? 'Yes' : 'No'}</Text>
|
|
28
|
+
</VStack>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Real Modal Example
|
|
34
|
+
|
|
35
|
+
This example shows how the hook works inside an actual mobile modal:
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
function ModalExample() {
|
|
39
|
+
const { openModal } = useModal();
|
|
40
|
+
|
|
41
|
+
const ExampleComponent = () => {
|
|
42
|
+
const { isOverlay, isModal, isDrawer, isTour } = useOverlayContentContext();
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<VStack gap={2}>
|
|
46
|
+
<Text variant="title3">Overlay Context Information</Text>
|
|
47
|
+
<Text>Is inside any overlay: {isOverlay ? 'Yes' : 'No'}</Text>
|
|
48
|
+
<Text>Is inside modal: {isModal ? 'Yes' : 'No'}</Text>
|
|
49
|
+
<Text>Is inside drawer/tray: {isDrawer ? 'Yes' : 'No'}</Text>
|
|
50
|
+
<Text>Is inside tour: {isTour ? 'Yes' : 'No'}</Text>
|
|
51
|
+
</VStack>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const ModalContent = () => {
|
|
56
|
+
return (
|
|
57
|
+
<VStack gap={3}>
|
|
58
|
+
<Text>This content is rendered inside a mobile modal. Notice the context values:</Text>
|
|
59
|
+
<VStack gap={2} padding={3} backgroundColor="surface1">
|
|
60
|
+
<ExampleComponent />
|
|
61
|
+
</VStack>
|
|
62
|
+
<Text color="muted" variant="caption">
|
|
63
|
+
The hook automatically detects it's inside a modal context on mobile!
|
|
64
|
+
</Text>
|
|
65
|
+
</VStack>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const handleOpenModal = () => {
|
|
70
|
+
openModal({
|
|
71
|
+
children: <ModalContent />,
|
|
72
|
+
header: 'Mobile Modal with Context',
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<VStack gap={3}>
|
|
78
|
+
<VStack gap={2} padding={3} backgroundColor="surface2">
|
|
79
|
+
<Text variant="title3">Outside Modal</Text>
|
|
80
|
+
<ExampleComponent />
|
|
81
|
+
</VStack>
|
|
82
|
+
|
|
83
|
+
<Button onPress={handleOpenModal}>Open Modal to See Context Change</Button>
|
|
84
|
+
</VStack>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Using the Context Provider
|
|
90
|
+
|
|
91
|
+
You can also use the `OverlayContentContext` directly to provide context values:
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
function ContextProviderExample() {
|
|
95
|
+
const ExampleComponent = () => {
|
|
96
|
+
const { isOverlay, isModal, isDrawer, isTour } = useOverlayContentContext();
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<VStack gap={2}>
|
|
100
|
+
<Text variant="title3">Overlay Context Information</Text>
|
|
101
|
+
<Text>Is inside any overlay: {isOverlay ? 'Yes' : 'No'}</Text>
|
|
102
|
+
<Text>Is inside modal: {isModal ? 'Yes' : 'No'}</Text>
|
|
103
|
+
<Text>Is inside drawer/tray: {isDrawer ? 'Yes' : 'No'}</Text>
|
|
104
|
+
<Text>Is inside tour: {isTour ? 'Yes' : 'No'}</Text>
|
|
105
|
+
</VStack>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const contextValue = {
|
|
110
|
+
isModal: true,
|
|
111
|
+
isDrawer: false,
|
|
112
|
+
isTour: false,
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<OverlayContentContext.Provider value={contextValue}>
|
|
117
|
+
<VStack gap={2} padding={3} backgroundColor="surface2">
|
|
118
|
+
<Text variant="title3">Inside Context Provider</Text>
|
|
119
|
+
<ExampleComponent />
|
|
120
|
+
</VStack>
|
|
121
|
+
</OverlayContentContext.Provider>
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Conditional Rendering
|
|
127
|
+
|
|
128
|
+
Use the hook to conditionally render content based on overlay context:
|
|
129
|
+
|
|
130
|
+
```tsx
|
|
131
|
+
function ConditionalRenderingExample() {
|
|
132
|
+
const { openModal } = useModal();
|
|
133
|
+
|
|
134
|
+
const ConditionalContent = () => {
|
|
135
|
+
const { isOverlay, isModal } = useOverlayContentContext();
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<VStack gap={2}>
|
|
139
|
+
<Text variant="title3">Conditional Content</Text>
|
|
140
|
+
{isOverlay ? (
|
|
141
|
+
<VStack gap={1}>
|
|
142
|
+
<Text color="positive">✓ This content shows when inside an overlay</Text>
|
|
143
|
+
{isModal && <Text color="primary">🎯 Specifically inside a modal!</Text>}
|
|
144
|
+
</VStack>
|
|
145
|
+
) : (
|
|
146
|
+
<Text color="muted">This content shows when not in an overlay</Text>
|
|
147
|
+
)}
|
|
148
|
+
</VStack>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const handleOpenConditionalModal = () => {
|
|
153
|
+
openModal({
|
|
154
|
+
children: <ConditionalContent />,
|
|
155
|
+
header: 'Conditional Content Demo',
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
return (
|
|
160
|
+
<VStack gap={3}>
|
|
161
|
+
<VStack gap={2} padding={3} backgroundColor="surface2">
|
|
162
|
+
<Text variant="title3">Outside Modal</Text>
|
|
163
|
+
<ConditionalContent />
|
|
164
|
+
</VStack>
|
|
165
|
+
|
|
166
|
+
<Button onPress={handleOpenConditionalModal}>Open Modal to See Different Content</Button>
|
|
167
|
+
</VStack>
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Mobile-Specific Behavior
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
function MobileBehaviorExample() {
|
|
176
|
+
const { isModal, isDrawer, isTour } = useOverlayContentContext();
|
|
177
|
+
|
|
178
|
+
// Adjust touch behavior based on overlay type
|
|
179
|
+
const getTouchHandler = () => {
|
|
180
|
+
if (isModal) return handleModalTouch;
|
|
181
|
+
if (isDrawer) return handleDrawerTouch;
|
|
182
|
+
if (isTour) return handleTourTouch;
|
|
183
|
+
return handleDefaultTouch;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
return (
|
|
187
|
+
<Pressable onPress={getTouchHandler()}>
|
|
188
|
+
<VStack gap={2} padding={3}>
|
|
189
|
+
<Text variant="title3">Touch Behavior</Text>
|
|
190
|
+
<Text>Touch handling adapts to overlay context</Text>
|
|
191
|
+
</VStack>
|
|
192
|
+
</Pressable>
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Safe Area Adjustments
|
|
198
|
+
|
|
199
|
+
```tsx
|
|
200
|
+
function SafeAreaExample() {
|
|
201
|
+
const { isModal, isDrawer } = useOverlayContentContext();
|
|
202
|
+
|
|
203
|
+
// Adjust safe area behavior for different overlay types
|
|
204
|
+
const shouldUseSafeArea = !isModal && !isDrawer;
|
|
205
|
+
|
|
206
|
+
return (
|
|
207
|
+
<VStack gap={2} padding={3} paddingTop={shouldUseSafeArea ? 'safeTop' : 3}>
|
|
208
|
+
<Text variant="title3">Safe Area Handling</Text>
|
|
209
|
+
<Text>Safe area behavior adapts to overlay context</Text>
|
|
210
|
+
</VStack>
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
|
|
2
|
+
# useTheme
|
|
3
|
+
Returns the currently active theme including color schemes, spacing, typography, and other design tokens.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { useTheme } from '@coinbase/cds-mobile'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### `useTheme` hook
|
|
14
|
+
|
|
15
|
+
The `useTheme` hook provides access to the current `theme` and `activeColorScheme`.
|
|
16
|
+
|
|
17
|
+
The `color` and `spectrum` objects automatically change based on the `activeColorScheme`.
|
|
18
|
+
|
|
19
|
+
```jsx
|
|
20
|
+
const theme = useTheme();
|
|
21
|
+
theme.activeColorScheme; // "light" or "dark"
|
|
22
|
+
theme.spectrum; // Resolves to lightSpectrum or darkSpectrum, depends on activeColorScheme
|
|
23
|
+
theme.color; // Resolves to lightColor or darkColor, depends on activeColorScheme
|
|
24
|
+
theme.color.bgPrimary; // "rgb(0,82,255)" or "rgb(87,139,250)", depends on activeColorScheme
|
|
25
|
+
theme.space[2]; // 16
|
|
26
|
+
theme.borderRadius[200]; // 8
|
|
27
|
+
theme.fontSize.display3; // 40
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Basic usage
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
function Example() {
|
|
34
|
+
const theme = useTheme();
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<VStack gap={2}>
|
|
38
|
+
<Box padding={3} background="bgAlternate" borderRadius={300}>
|
|
39
|
+
<Text>Current Color Scheme: {theme.activeColorScheme}</Text>
|
|
40
|
+
</Box>
|
|
41
|
+
|
|
42
|
+
<Box padding={3} background="bgAlternate" borderRadius={300}>
|
|
43
|
+
<Text font="headline">Theme Colors</Text>
|
|
44
|
+
<Text>Primary: {theme.color.bgPrimary}</Text>
|
|
45
|
+
<Text>Background: {theme.color.bg}</Text>
|
|
46
|
+
<Text>Text: {theme.color.fg}</Text>
|
|
47
|
+
</Box>
|
|
48
|
+
</VStack>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Styling with Theme values
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
function Example() {
|
|
57
|
+
const theme = useTheme();
|
|
58
|
+
|
|
59
|
+
const styles = StyleSheet.create({
|
|
60
|
+
container: {
|
|
61
|
+
padding: theme.space[3],
|
|
62
|
+
backgroundColor: theme.color.bgAlternate,
|
|
63
|
+
borderRadius: theme.borderRadius[300],
|
|
64
|
+
...Platform.select({
|
|
65
|
+
ios: {
|
|
66
|
+
shadowColor: theme.shadow.elevation1.shadowColor,
|
|
67
|
+
shadowOffset: theme.shadow.elevation1.shadowOffset,
|
|
68
|
+
shadowOpacity: theme.shadow.elevation1.shadowOpacity,
|
|
69
|
+
shadowRadius: theme.shadow.elevation1.shadowRadius,
|
|
70
|
+
},
|
|
71
|
+
android: {
|
|
72
|
+
elevation: 1,
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
},
|
|
76
|
+
text: {
|
|
77
|
+
fontSize: theme.fontSize.body,
|
|
78
|
+
lineHeight: theme.lineHeight.body,
|
|
79
|
+
fontFamily: theme.fontFamily.body,
|
|
80
|
+
color: theme.color.fgPrimary,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<Box style={styles.container}>
|
|
86
|
+
<Text style={styles.text}>Styled using theme values</Text>
|
|
87
|
+
</Box>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Color scheme detection
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
function Example() {
|
|
96
|
+
const theme = useTheme();
|
|
97
|
+
const isDarkMode = theme.activeColorScheme === 'dark';
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<Box padding={3} background={isDarkMode ? 'bgElevation1' : 'bgAlternate'} borderRadius={300}>
|
|
101
|
+
<Text>This box adapts to {isDarkMode ? 'dark' : 'light'} mode</Text>
|
|
102
|
+
<Text color={isDarkMode ? 'fgMuted' : 'fgPrimary'} font="headline">
|
|
103
|
+
With adaptive text colors
|
|
104
|
+
</Text>
|
|
105
|
+
</Box>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
|
|
2
|
+
# CDS Routes
|
|
3
|
+
|
|
4
|
+
## Getting Started
|
|
5
|
+
|
|
6
|
+
- [playground](mobile/getting-started/playground.txt)
|
|
7
|
+
- [mcp-server](mobile/getting-started/mcp-server.txt)
|
|
8
|
+
- [introduction](mobile/getting-started/introduction.txt)
|
|
9
|
+
|
|
10
|
+
## Components
|
|
11
|
+
|
|
12
|
+
- [Text](mobile/components/Text.txt): A generic text element.
|
|
13
|
+
- [Tag](mobile/components/Tag.txt): A small label for categorizing or labeling content.
|
|
14
|
+
- [Link](mobile/components/Link.txt): A pressable Text component.
|
|
15
|
+
- [Tray](mobile/components/Tray.txt): An elevated container pinned to the bottom of the screen.
|
|
16
|
+
- [Tooltip](mobile/components/Tooltip.txt): A component that displays additional information on press.
|
|
17
|
+
- [Toast](mobile/components/Toast.txt): A temporary notification that appears at the bottom of the screen.
|
|
18
|
+
- [PortalProvider](mobile/components/PortalProvider.txt): A component that manages the rendering of portals for overlay components.
|
|
19
|
+
- [Overlay](mobile/components/Overlay.txt): A semi-transparent layer that covers content.
|
|
20
|
+
- [ModalHeader](mobile/components/ModalHeader.txt): A component that provides a consistent header section for Modal.
|
|
21
|
+
- [ModalFooter](mobile/components/ModalFooter.txt): A footer component for Modal.
|
|
22
|
+
- [ModalBody](mobile/components/ModalBody.txt): A main content area component for Modal.
|
|
23
|
+
- [Modal](mobile/components/Modal.txt): A component that displays content in a window that requires user interaction.
|
|
24
|
+
- [Alert](mobile/components/Alert.txt): A dialog that communicates critical information and blocks user interaction.
|
|
25
|
+
- [ThemeProvider](mobile/components/ThemeProvider.txt): Provides the theme context to all child components.
|
|
26
|
+
- [DotSymbol](mobile/components/DotSymbol.txt): Dots are component adornments, typically used to communicate a numerical value or indicate the status or identity of a component to the end-user.
|
|
27
|
+
- [DotStatusColor](mobile/components/DotStatusColor.txt): Dots are component adornments, typically used to communicate a numerical value or indicate the status or identity of a component to the end-user.
|
|
28
|
+
- [DotCount](mobile/components/DotCount.txt): Dots are component adornments, typically used to communicate a numerical value or indicate the status or identity of a component to the end-user.
|
|
29
|
+
- [DatePicker](mobile/components/DatePicker.txt): Date Picker allows our global users to input past, present, future and important dates into our interface in a simple and intuitive manner. Date Picker offers both manual and calendar entry options - accommodating both internationalization and accessibility needs while being adaptable across screen platforms.
|
|
30
|
+
- [RollingNumber](mobile/components/RollingNumber.txt): A numeric display that animates value changes with rolling digits.
|
|
31
|
+
- [Tour](mobile/components/Tour.txt): Creates guided tours of a user interface.
|
|
32
|
+
- [TopNavBar](mobile/components/TopNavBar.txt): A customizable top navigation bar that can contain start, middle, and end content, as well as a bottom section for elements like tabs. It remains sticky at the top of the screen.
|
|
33
|
+
- [Tabs](mobile/components/Tabs.txt): Tabs is a flexible, accessible tab navigation component for React Native, supporting animated indicators, custom tab components, and full accessibility.
|
|
34
|
+
- [TabbedChips](mobile/components/TabbedChips.txt): Tab chips are to be used in a filter setting where the user is given the ability to refine the data source they are accessing.
|
|
35
|
+
- [TabNavigation](mobile/components/TabNavigation.txt): Organizes content across different screens or data sets.
|
|
36
|
+
- [TabLabel](mobile/components/TabLabel.txt): A text label component used within tab navigation.
|
|
37
|
+
- [TabIndicator](mobile/components/TabIndicator.txt): A visual indicator that shows the active tab position.
|
|
38
|
+
- [Stepper](mobile/components/Stepper.txt): A component that visualizes states within a multi-step process.
|
|
39
|
+
- [SegmentedTabs](mobile/components/SegmentedTabs.txt): Switches between different views of content.
|
|
40
|
+
- [SectionHeader](mobile/components/SectionHeader.txt): A header component used to organize and label sections of content, with support for icons, descriptions, and additional content, optimized for mobile platforms.
|
|
41
|
+
- [PageHeader](mobile/components/PageHeader.txt): Page Header is a flexible header component.
|
|
42
|
+
- [PageFooter](mobile/components/PageFooter.txt): PageFooter is a layout component that provides a consistent footer area for pages, with centered alignment and fixed height, typically used for action buttons or navigation elements.
|
|
43
|
+
- [NavigationTitleSelect](mobile/components/NavigationTitleSelect.txt): A select component styled as a navigation title, allowing users to switch between different views or contexts from the header. It opens a Tray on mobile.
|
|
44
|
+
- [NavigationTitle](mobile/components/NavigationTitle.txt): A component used to display a title within a navigation bar, with default styling for headlines.
|
|
45
|
+
- [Coachmark](mobile/components/Coachmark.txt): Coachmark is a flexible, accessible overlay component for onboarding, feature tours, and contextual help in React Native apps. It supports custom content, actions, and media.
|
|
46
|
+
- [BrowserBar](mobile/components/BrowserBar.txt): A navigation bar designed for browser-like interfaces, featuring slots for start, end, and central content. It provides a structured layout for controls and information within a browser context.
|
|
47
|
+
- [SubBrandLogoWordMark](mobile/components/SubBrandLogoWordMark.txt): Coinbase sub-brand logo wordmarks for specialized branding.
|
|
48
|
+
- [SubBrandLogoMark](mobile/components/SubBrandLogoMark.txt): Coinbase sub-brand logo marks for specialized branding.
|
|
49
|
+
- [SpotSquare](mobile/components/SpotSquare.txt): A square-shaped illustration component for displaying spot graphics.
|
|
50
|
+
- [SpotRectangle](mobile/components/SpotRectangle.txt): A rectangular illustration component for displaying spot graphics.
|
|
51
|
+
- [SpotIcon](mobile/components/SpotIcon.txt): An icon-sized illustration component for displaying spot graphics.
|
|
52
|
+
- [RemoteImageGroup](mobile/components/RemoteImageGroup.txt): A component to display a group of RemoteImage components in a stack.
|
|
53
|
+
- [RemoteImage](mobile/components/RemoteImage.txt): A React component for displaying different types of images, including network images, static resources, temporary local images, and images from local disk, such as the camera roll.
|
|
54
|
+
- [Pictogram](mobile/components/Pictogram.txt): Displays elevated product icons.
|
|
55
|
+
- [LogoWordMark](mobile/components/LogoWordMark.txt): The full Coinbase logo with text for branding.
|
|
56
|
+
- [LogoMark](mobile/components/LogoMark.txt): The Coinbase logo mark for branding.
|
|
57
|
+
- [Icon](mobile/components/Icon.txt): Displays icons from the icon font.
|
|
58
|
+
- [HeroSquare](mobile/components/HeroSquare.txt): Displays a square-shaped hero illustration.
|
|
59
|
+
- [CellMedia](mobile/components/CellMedia.txt): Displays media within cells.
|
|
60
|
+
- [Avatar](mobile/components/Avatar.txt): Avatar is a visual representation of a user, company, or entity.
|
|
61
|
+
- [VStack](mobile/components/VStack.txt): A Box with flexDirection="column" set by default.
|
|
62
|
+
- [Spacer](mobile/components/Spacer.txt): Creates space between elements.
|
|
63
|
+
- [MultiContentModule](mobile/components/MultiContentModule.txt): A versatile container designed to streamline user experiences across Critical User Journeys. Accommodates a range of content including an illustration, input fields (text inputs, list cells, etc.), and an action button.
|
|
64
|
+
- [HStack](mobile/components/HStack.txt): A Box with flexDirection="row" set by default.
|
|
65
|
+
- [Divider](mobile/components/Divider.txt): Separates content into sections.
|
|
66
|
+
- [Collapsible](mobile/components/Collapsible.txt): A container that can be expanded or collapsed.
|
|
67
|
+
- [Carousel](mobile/components/Carousel.txt): A flexible carousel component for displaying sequences of content with navigation and pagination options.
|
|
68
|
+
- [ButtonGroup](mobile/components/ButtonGroup.txt): Groups buttons with consistent spacing.
|
|
69
|
+
- [Box](mobile/components/Box.txt): A generic container, like a supercharged View.
|
|
70
|
+
- [AccordionItem](mobile/components/AccordionItem.txt): An individual collapsible item within an Accordion.
|
|
71
|
+
- [Accordion](mobile/components/Accordion.txt): A collapsible component for displaying auxiliary content.
|
|
72
|
+
- [TextInput](mobile/components/TextInput.txt): A control for entering text.
|
|
73
|
+
- [Switch](mobile/components/Switch.txt): A control for toggling between on and off.
|
|
74
|
+
- [SlideButton](mobile/components/SlideButton.txt): A button that slides to confirm an action.
|
|
75
|
+
- [SelectOption](mobile/components/SelectOption.txt): A single option of a Select component.
|
|
76
|
+
- [SelectChip](mobile/components/SelectChip.txt): A Chip and Select control for selecting from a list of options
|
|
77
|
+
- [Select](mobile/components/Select.txt): A control for selecting from a list of options.
|
|
78
|
+
- [SearchInput](mobile/components/SearchInput.txt): A control for searching a dataset.
|
|
79
|
+
- [RadioGroup](mobile/components/RadioGroup.txt): Radio is a control component that allows users to select one option from a set.
|
|
80
|
+
- [RadioCell](mobile/components/RadioCell.txt): A selectable cell that pairs a radio button with a title and description for single-choice selections.
|
|
81
|
+
- [Radio](mobile/components/Radio.txt): Radio is a control component that allows users to select one option from a set of mutually exclusive options.
|
|
82
|
+
- [Pressable](mobile/components/Pressable.txt): Extends the Interactable component to add accessibility support for press interactions.
|
|
83
|
+
- [Numpad](mobile/components/Numpad.txt): A keypad for entering numbers.
|
|
84
|
+
- [Interactable](mobile/components/Interactable.txt): A generic component for creating interactable elements. Provides dynamic styling for hovered, pressed, and disabled states.
|
|
85
|
+
- [InputChip](mobile/components/InputChip.txt): A Chip used for removable selections.
|
|
86
|
+
- [IconButton](mobile/components/IconButton.txt): A Button with an Icon for content.
|
|
87
|
+
- [ControlGroup](mobile/components/ControlGroup.txt): A layout component that arranges and manages a group of related controls, such as radio buttons, switches, or checkboxes.
|
|
88
|
+
- [Chip](mobile/components/Chip.txt): A compact, interactive content element.
|
|
89
|
+
- [CheckboxGroup](mobile/components/CheckboxGroup.txt): CheckboxGroup is a control component that allows users to select multiple options from a set of choices. It manages the state and layout of multiple checkbox inputs as a cohesive group.
|
|
90
|
+
- [CheckboxCell](mobile/components/CheckboxCell.txt): A selectable cell that pairs a checkbox with a title and description for multi-choice selections.
|
|
91
|
+
- [Checkbox](mobile/components/Checkbox.txt): Checkbox is a type of control component that allows user to select one or more options from a set. They can also be used alone to switch between on and off.
|
|
92
|
+
- [Button](mobile/components/Button.txt): A pressable button element.
|
|
93
|
+
- [AvatarButton](mobile/components/AvatarButton.txt): A pressable Avatar.
|
|
94
|
+
- [YAxis](mobile/components/YAxis.txt): A vertical axis component for CartesianChart. Displays tick marks, labels, gridlines, and supports custom formatting, positioning, and data domains.
|
|
95
|
+
- [XAxis](mobile/components/XAxis.txt): A horizontal axis component for CartesianChart. Displays tick marks, labels, gridlines, and supports custom formatting, positioning, and data domains.
|
|
96
|
+
- [SparklineInteractiveHeader](mobile/components/SparklineInteractiveHeader.txt): The SparklineInteractiveHeader is used to display chart information that changes over time
|
|
97
|
+
- [SparklineInteractive](mobile/components/SparklineInteractive.txt): The SparklineInteractive is used to display a Sparkline that has multiple time periods
|
|
98
|
+
- [SparklineGradient](mobile/components/SparklineGradient.txt): A small line chart component with gradient fill below the line.
|
|
99
|
+
- [Sparkline](mobile/components/Sparkline.txt): A small line chart component for displaying data trends.
|
|
100
|
+
- [Scrubber](mobile/components/Scrubber.txt): An interactive scrubber component for exploring individual data points in charts. Displays values on hover or drag and supports custom labels and formatting.
|
|
101
|
+
- [ReferenceLine](mobile/components/ReferenceLine.txt): A horizontal or vertical reference line to mark important values on a chart, such as targets, thresholds, or baseline values.
|
|
102
|
+
- [Point](mobile/components/Point.txt): Visual markers that highlight specific data values on a chart. Points can be customized with different colors, sizes, and interactivity.
|
|
103
|
+
- [PeriodSelector](mobile/components/PeriodSelector.txt): A selector component for choosing time periods in charts.
|
|
104
|
+
- [LineChart](mobile/components/LineChart.txt): A flexible line chart component for displaying data trends over time. Supports multiple series, custom curves, areas, scrubbing, and interactive data exploration.
|
|
105
|
+
- [CartesianChart](mobile/components/CartesianChart.txt): A flexible, low-level chart component for displaying data in an x/y coordinate space. Provides a foundation for building custom chart visualizations with full control over rendering.
|
|
106
|
+
- [BarChart](mobile/components/BarChart.txt): A bar chart component for comparing values across categories. Supports horizontal and vertical orientations, stacked bars, and grouped series.
|
|
107
|
+
- [AreaChart](mobile/components/AreaChart.txt): A chart component that displays data as filled areas beneath lines. Ideal for showing cumulative values, stacked data, or emphasizing volume over time.
|
|
108
|
+
- [Spinner](mobile/components/Spinner.txt): A component that displays a spinning animation.
|
|
109
|
+
- [ProgressCircle](mobile/components/ProgressCircle.txt): A circular visual indicator of completion progress.
|
|
110
|
+
- [ProgressBarWithFloatLabel](mobile/components/ProgressBarWithFloatLabel.txt): A ProgressBar with a floating label that moves with progress.
|
|
111
|
+
- [ProgressBarWithFixedLabels](mobile/components/ProgressBarWithFixedLabels.txt): A ProgressBar with fixed labels at defined positions.
|
|
112
|
+
- [ProgressBar](mobile/components/ProgressBar.txt): A visual indicator of completion progress.
|
|
113
|
+
- [Fallback](mobile/components/Fallback.txt): A component that displays a fallback animation.
|
|
114
|
+
- [Banner](mobile/components/Banner.txt): Displays important messages and actions to users.
|
|
115
|
+
- [ListCell](mobile/components/ListCell.txt): A versatile cell component used for displaying content in a list format, supporting various layouts and interactions.
|
|
116
|
+
- [ContentCell](mobile/components/ContentCell.txt): A versatile cell component for displaying content with optional metadata.
|
|
117
|
+
- [UpsellCard](mobile/components/UpsellCard.txt): Upsell Cards are used to promote new features, products, or actions within the app. They are part of the upsell framework and aim to drive user engagement and revenue.
|
|
118
|
+
- [NudgeCard](mobile/components/NudgeCard.txt): A card component designed to encourage users to take essential actions.
|
|
119
|
+
- [FloatingAssetCard](mobile/components/FloatingAssetCard.txt): Asset Cards display current and potential future assets, offering a straightforward method to view and manage a customer's holdings. They provide a clear visual and informative overview, simplifying asset management and investment considerations.
|
|
120
|
+
- [ContentCardHeader](mobile/components/ContentCardHeader.txt): ContentCardHeader is a subcomponent of ContentCard that provides the header section of the card, typically used for the title and subtitle.
|
|
121
|
+
- [ContentCardFooter](mobile/components/ContentCardFooter.txt): ContentCardFooter is a subcomponent of ContentCard that provides the footer section of the card, typically used for actions or additional information.
|
|
122
|
+
- [ContentCardBody](mobile/components/ContentCardBody.txt): ContentCardBody is a subcomponent of ContentCard that provides the main content area of the card.
|
|
123
|
+
- [ContentCard](mobile/components/ContentCard.txt): A flexible card component for displaying content with header, body, and footer sections.
|
|
124
|
+
- [ContainedAssetCard](mobile/components/ContainedAssetCard.txt): Asset Cards display current and potential future assets, offering a straightforward method to view and manage a customer's holdings. They provide a clear visual and informative overview, simplifying asset management and investment considerations.
|
|
125
|
+
- [LottieStatusAnimation](mobile/components/LottieStatusAnimation.txt): A specialized component for displaying trade status animations.
|
|
126
|
+
- [Lottie](mobile/components/Lottie.txt): Renders After Effects animations as vectors.
|
|
127
|
+
|
|
128
|
+
## Hooks
|
|
129
|
+
|
|
130
|
+
- [useTheme](mobile/hooks/useTheme.txt): Returns the currently active theme including color schemes, spacing, typography, and other design tokens.
|
|
131
|
+
- [useOverlayContentContext](mobile/hooks/useOverlayContentContext.txt): A React context and hook for detecting if components are rendered inside overlay containers like modals, drawers, tours, and trays.
|
|
132
|
+
- [useDimensions](mobile/hooks/useDimensions.txt): Measures the screen dimensions and status bar height.
|