@coinbase/cds-mcp-server 8.17.2 → 8.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/mcp-docs/mobile/components/Accordion.txt +189 -0
  3. package/mcp-docs/mobile/components/AccordionItem.txt +30 -0
  4. package/mcp-docs/mobile/components/Alert.txt +156 -0
  5. package/mcp-docs/mobile/components/AreaChart.txt +266 -0
  6. package/mcp-docs/mobile/components/Avatar.txt +196 -0
  7. package/mcp-docs/mobile/components/AvatarButton.txt +226 -0
  8. package/mcp-docs/mobile/components/Banner.txt +222 -0
  9. package/mcp-docs/mobile/components/BarChart.txt +816 -0
  10. package/mcp-docs/mobile/components/Box.txt +174 -0
  11. package/mcp-docs/mobile/components/BrowserBar.txt +147 -0
  12. package/mcp-docs/mobile/components/Button.txt +199 -0
  13. package/mcp-docs/mobile/components/ButtonGroup.txt +80 -0
  14. package/mcp-docs/mobile/components/Carousel.txt +1084 -0
  15. package/mcp-docs/mobile/components/CartesianChart.txt +826 -0
  16. package/mcp-docs/mobile/components/CellMedia.txt +71 -0
  17. package/mcp-docs/mobile/components/Checkbox.txt +246 -0
  18. package/mcp-docs/mobile/components/CheckboxCell.txt +202 -0
  19. package/mcp-docs/mobile/components/CheckboxGroup.txt +285 -0
  20. package/mcp-docs/mobile/components/Chip.txt +195 -0
  21. package/mcp-docs/mobile/components/Coachmark.txt +158 -0
  22. package/mcp-docs/mobile/components/Collapsible.txt +105 -0
  23. package/mcp-docs/mobile/components/ContainedAssetCard.txt +135 -0
  24. package/mcp-docs/mobile/components/ContentCard.txt +366 -0
  25. package/mcp-docs/mobile/components/ContentCardBody.txt +136 -0
  26. package/mcp-docs/mobile/components/ContentCardFooter.txt +128 -0
  27. package/mcp-docs/mobile/components/ContentCardHeader.txt +146 -0
  28. package/mcp-docs/mobile/components/ContentCell.txt +227 -0
  29. package/mcp-docs/mobile/components/ControlGroup.txt +444 -0
  30. package/mcp-docs/mobile/components/DatePicker.txt +497 -0
  31. package/mcp-docs/mobile/components/Divider.txt +139 -0
  32. package/mcp-docs/mobile/components/DotCount.txt +146 -0
  33. package/mcp-docs/mobile/components/DotStatusColor.txt +59 -0
  34. package/mcp-docs/mobile/components/DotSymbol.txt +135 -0
  35. package/mcp-docs/mobile/components/Fallback.txt +158 -0
  36. package/mcp-docs/mobile/components/FloatingAssetCard.txt +156 -0
  37. package/mcp-docs/mobile/components/HStack.txt +235 -0
  38. package/mcp-docs/mobile/components/HeroSquare.txt +48 -0
  39. package/mcp-docs/mobile/components/Icon.txt +52 -0
  40. package/mcp-docs/mobile/components/IconButton.txt +269 -0
  41. package/mcp-docs/mobile/components/InputChip.txt +188 -0
  42. package/mcp-docs/mobile/components/Interactable.txt +187 -0
  43. package/mcp-docs/mobile/components/LineChart.txt +1325 -0
  44. package/mcp-docs/mobile/components/Link.txt +292 -0
  45. package/mcp-docs/mobile/components/ListCell.txt +391 -0
  46. package/mcp-docs/mobile/components/LogoMark.txt +85 -0
  47. package/mcp-docs/mobile/components/LogoWordMark.txt +94 -0
  48. package/mcp-docs/mobile/components/Lottie.txt +139 -0
  49. package/mcp-docs/mobile/components/LottieStatusAnimation.txt +47 -0
  50. package/mcp-docs/mobile/components/Modal.txt +84 -0
  51. package/mcp-docs/mobile/components/ModalBody.txt +34 -0
  52. package/mcp-docs/mobile/components/ModalFooter.txt +25 -0
  53. package/mcp-docs/mobile/components/ModalHeader.txt +28 -0
  54. package/mcp-docs/mobile/components/MultiContentModule.txt +380 -0
  55. package/mcp-docs/mobile/components/NavigationTitle.txt +132 -0
  56. package/mcp-docs/mobile/components/NavigationTitleSelect.txt +142 -0
  57. package/mcp-docs/mobile/components/NudgeCard.txt +90 -0
  58. package/mcp-docs/mobile/components/Numpad.txt +341 -0
  59. package/mcp-docs/mobile/components/Overlay.txt +152 -0
  60. package/mcp-docs/mobile/components/PageFooter.txt +161 -0
  61. package/mcp-docs/mobile/components/PageHeader.txt +186 -0
  62. package/mcp-docs/mobile/components/PeriodSelector.txt +408 -0
  63. package/mcp-docs/mobile/components/Pictogram.txt +48 -0
  64. package/mcp-docs/mobile/components/Point.txt +205 -0
  65. package/mcp-docs/mobile/components/PortalProvider.txt +79 -0
  66. package/mcp-docs/mobile/components/Pressable.txt +211 -0
  67. package/mcp-docs/mobile/components/ProgressBar.txt +130 -0
  68. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +161 -0
  69. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +138 -0
  70. package/mcp-docs/mobile/components/ProgressCircle.txt +237 -0
  71. package/mcp-docs/mobile/components/Radio.txt +242 -0
  72. package/mcp-docs/mobile/components/RadioCell.txt +202 -0
  73. package/mcp-docs/mobile/components/RadioGroup.txt +282 -0
  74. package/mcp-docs/mobile/components/ReferenceLine.txt +153 -0
  75. package/mcp-docs/mobile/components/RemoteImage.txt +106 -0
  76. package/mcp-docs/mobile/components/RemoteImageGroup.txt +61 -0
  77. package/mcp-docs/mobile/components/RollingNumber.txt +789 -0
  78. package/mcp-docs/mobile/components/Scrubber.txt +204 -0
  79. package/mcp-docs/mobile/components/SearchInput.txt +192 -0
  80. package/mcp-docs/mobile/components/SectionHeader.txt +205 -0
  81. package/mcp-docs/mobile/components/SegmentedTabs.txt +316 -0
  82. package/mcp-docs/mobile/components/Select.txt +212 -0
  83. package/mcp-docs/mobile/components/SelectChip.txt +324 -0
  84. package/mcp-docs/mobile/components/SelectOption.txt +85 -0
  85. package/mcp-docs/mobile/components/SlideButton.txt +331 -0
  86. package/mcp-docs/mobile/components/Spacer.txt +84 -0
  87. package/mcp-docs/mobile/components/Sparkline.txt +123 -0
  88. package/mcp-docs/mobile/components/SparklineGradient.txt +107 -0
  89. package/mcp-docs/mobile/components/SparklineInteractive.txt +157 -0
  90. package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +73 -0
  91. package/mcp-docs/mobile/components/Spinner.txt +49 -0
  92. package/mcp-docs/mobile/components/SpotIcon.txt +48 -0
  93. package/mcp-docs/mobile/components/SpotRectangle.txt +48 -0
  94. package/mcp-docs/mobile/components/SpotSquare.txt +48 -0
  95. package/mcp-docs/mobile/components/Stepper.txt +528 -0
  96. package/mcp-docs/mobile/components/SubBrandLogoMark.txt +126 -0
  97. package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +126 -0
  98. package/mcp-docs/mobile/components/Switch.txt +98 -0
  99. package/mcp-docs/mobile/components/TabIndicator.txt +49 -0
  100. package/mcp-docs/mobile/components/TabLabel.txt +154 -0
  101. package/mcp-docs/mobile/components/TabNavigation.txt +147 -0
  102. package/mcp-docs/mobile/components/TabbedChips.txt +143 -0
  103. package/mcp-docs/mobile/components/Tabs.txt +191 -0
  104. package/mcp-docs/mobile/components/Tag.txt +301 -0
  105. package/mcp-docs/mobile/components/Text.txt +212 -0
  106. package/mcp-docs/mobile/components/TextInput.txt +718 -0
  107. package/mcp-docs/mobile/components/ThemeProvider.txt +133 -0
  108. package/mcp-docs/mobile/components/Toast.txt +197 -0
  109. package/mcp-docs/mobile/components/Tooltip.txt +60 -0
  110. package/mcp-docs/mobile/components/TopNavBar.txt +162 -0
  111. package/mcp-docs/mobile/components/Tour.txt +159 -0
  112. package/mcp-docs/mobile/components/Tray.txt +253 -0
  113. package/mcp-docs/mobile/components/UpsellCard.txt +322 -0
  114. package/mcp-docs/mobile/components/VStack.txt +223 -0
  115. package/mcp-docs/mobile/components/XAxis.txt +622 -0
  116. package/mcp-docs/mobile/components/YAxis.txt +568 -0
  117. package/mcp-docs/mobile/getting-started/introduction.txt +99 -0
  118. package/mcp-docs/mobile/getting-started/mcp-server.txt +94 -0
  119. package/mcp-docs/mobile/getting-started/playground.txt +25 -0
  120. package/mcp-docs/mobile/hooks/useDimensions.txt +47 -0
  121. package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +215 -0
  122. package/mcp-docs/mobile/hooks/useTheme.txt +110 -0
  123. package/mcp-docs/mobile/routes.txt +132 -0
  124. package/mcp-docs/web/components/Accordion.txt +190 -0
  125. package/mcp-docs/web/components/AccordionItem.txt +32 -0
  126. package/mcp-docs/web/components/Alert.txt +165 -0
  127. package/mcp-docs/web/components/AreaChart.txt +511 -0
  128. package/mcp-docs/web/components/Avatar.txt +212 -0
  129. package/mcp-docs/web/components/AvatarButton.txt +241 -0
  130. package/mcp-docs/web/components/Banner.txt +227 -0
  131. package/mcp-docs/web/components/BarChart.txt +1268 -0
  132. package/mcp-docs/web/components/Box.txt +176 -0
  133. package/mcp-docs/web/components/Button.txt +213 -0
  134. package/mcp-docs/web/components/ButtonGroup.txt +80 -0
  135. package/mcp-docs/web/components/Calendar.txt +182 -0
  136. package/mcp-docs/web/components/Carousel.txt +1576 -0
  137. package/mcp-docs/web/components/CartesianChart.txt +1045 -0
  138. package/mcp-docs/web/components/CellMedia.txt +57 -0
  139. package/mcp-docs/web/components/Checkbox.txt +189 -0
  140. package/mcp-docs/web/components/CheckboxCell.txt +203 -0
  141. package/mcp-docs/web/components/CheckboxGroup.txt +220 -0
  142. package/mcp-docs/web/components/Chip.txt +197 -0
  143. package/mcp-docs/web/components/Coachmark.txt +189 -0
  144. package/mcp-docs/web/components/Collapsible.txt +120 -0
  145. package/mcp-docs/web/components/ContainedAssetCard.txt +233 -0
  146. package/mcp-docs/web/components/ContentCard.txt +368 -0
  147. package/mcp-docs/web/components/ContentCardBody.txt +138 -0
  148. package/mcp-docs/web/components/ContentCardFooter.txt +130 -0
  149. package/mcp-docs/web/components/ContentCardHeader.txt +148 -0
  150. package/mcp-docs/web/components/ContentCell.txt +220 -0
  151. package/mcp-docs/web/components/ControlGroup.txt +437 -0
  152. package/mcp-docs/web/components/DatePicker.txt +506 -0
  153. package/mcp-docs/web/components/Divider.txt +144 -0
  154. package/mcp-docs/web/components/DotCount.txt +150 -0
  155. package/mcp-docs/web/components/DotStatusColor.txt +59 -0
  156. package/mcp-docs/web/components/DotSymbol.txt +138 -0
  157. package/mcp-docs/web/components/Dropdown.txt +120 -0
  158. package/mcp-docs/web/components/Fallback.txt +164 -0
  159. package/mcp-docs/web/components/FloatingAssetCard.txt +251 -0
  160. package/mcp-docs/web/components/FullscreenAlert.txt +70 -0
  161. package/mcp-docs/web/components/FullscreenModal.txt +146 -0
  162. package/mcp-docs/web/components/FullscreenModalLayout.txt +188 -0
  163. package/mcp-docs/web/components/Grid.txt +237 -0
  164. package/mcp-docs/web/components/GridColumn.txt +210 -0
  165. package/mcp-docs/web/components/HStack.txt +237 -0
  166. package/mcp-docs/web/components/HeroSquare.txt +49 -0
  167. package/mcp-docs/web/components/Icon.txt +146 -0
  168. package/mcp-docs/web/components/IconButton.txt +391 -0
  169. package/mcp-docs/web/components/InputChip.txt +188 -0
  170. package/mcp-docs/web/components/Interactable.txt +194 -0
  171. package/mcp-docs/web/components/LineChart.txt +1577 -0
  172. package/mcp-docs/web/components/Link.txt +244 -0
  173. package/mcp-docs/web/components/ListCell.txt +397 -0
  174. package/mcp-docs/web/components/LogoMark.txt +85 -0
  175. package/mcp-docs/web/components/LogoWordMark.txt +94 -0
  176. package/mcp-docs/web/components/Lottie.txt +158 -0
  177. package/mcp-docs/web/components/LottieStatusAnimation.txt +58 -0
  178. package/mcp-docs/web/components/MediaQueryProvider.txt +109 -0
  179. package/mcp-docs/web/components/Modal.txt +193 -0
  180. package/mcp-docs/web/components/ModalBody.txt +118 -0
  181. package/mcp-docs/web/components/ModalFooter.txt +120 -0
  182. package/mcp-docs/web/components/ModalHeader.txt +124 -0
  183. package/mcp-docs/web/components/MultiContentModule.txt +382 -0
  184. package/mcp-docs/web/components/NavigationBar.txt +103 -0
  185. package/mcp-docs/web/components/NavigationTitle.txt +26 -0
  186. package/mcp-docs/web/components/NavigationTitleSelect.txt +46 -0
  187. package/mcp-docs/web/components/NudgeCard.txt +182 -0
  188. package/mcp-docs/web/components/Overlay.txt +172 -0
  189. package/mcp-docs/web/components/PageFooter.txt +185 -0
  190. package/mcp-docs/web/components/PageHeader.txt +244 -0
  191. package/mcp-docs/web/components/Pagination.txt +500 -0
  192. package/mcp-docs/web/components/PeriodSelector.txt +704 -0
  193. package/mcp-docs/web/components/Pictogram.txt +49 -0
  194. package/mcp-docs/web/components/Point.txt +461 -0
  195. package/mcp-docs/web/components/PortalProvider.txt +77 -0
  196. package/mcp-docs/web/components/Pressable.txt +194 -0
  197. package/mcp-docs/web/components/ProgressBar.txt +164 -0
  198. package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +213 -0
  199. package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +182 -0
  200. package/mcp-docs/web/components/ProgressCircle.txt +444 -0
  201. package/mcp-docs/web/components/Radio.txt +220 -0
  202. package/mcp-docs/web/components/RadioCell.txt +216 -0
  203. package/mcp-docs/web/components/RadioGroup.txt +289 -0
  204. package/mcp-docs/web/components/ReferenceLine.txt +452 -0
  205. package/mcp-docs/web/components/RemoteImage.txt +166 -0
  206. package/mcp-docs/web/components/RemoteImageGroup.txt +87 -0
  207. package/mcp-docs/web/components/RollingNumber.txt +1022 -0
  208. package/mcp-docs/web/components/Scrubber.txt +232 -0
  209. package/mcp-docs/web/components/SearchInput.txt +118 -0
  210. package/mcp-docs/web/components/SectionHeader.txt +218 -0
  211. package/mcp-docs/web/components/SegmentedTabs.txt +325 -0
  212. package/mcp-docs/web/components/Select.txt +225 -0
  213. package/mcp-docs/web/components/SelectChip.txt +315 -0
  214. package/mcp-docs/web/components/SelectOption.txt +166 -0
  215. package/mcp-docs/web/components/Sidebar.txt +350 -0
  216. package/mcp-docs/web/components/SidebarItem.txt +132 -0
  217. package/mcp-docs/web/components/SidebarMoreMenu.txt +31 -0
  218. package/mcp-docs/web/components/Spacer.txt +174 -0
  219. package/mcp-docs/web/components/Sparkline.txt +123 -0
  220. package/mcp-docs/web/components/SparklineGradient.txt +107 -0
  221. package/mcp-docs/web/components/SparklineInteractive.txt +154 -0
  222. package/mcp-docs/web/components/SparklineInteractiveHeader.txt +77 -0
  223. package/mcp-docs/web/components/Spinner.txt +129 -0
  224. package/mcp-docs/web/components/SpotIcon.txt +49 -0
  225. package/mcp-docs/web/components/SpotRectangle.txt +49 -0
  226. package/mcp-docs/web/components/SpotSquare.txt +49 -0
  227. package/mcp-docs/web/components/Stepper.txt +683 -0
  228. package/mcp-docs/web/components/SubBrandLogoMark.txt +126 -0
  229. package/mcp-docs/web/components/SubBrandLogoWordMark.txt +126 -0
  230. package/mcp-docs/web/components/Switch.txt +86 -0
  231. package/mcp-docs/web/components/TabIndicator.txt +49 -0
  232. package/mcp-docs/web/components/TabLabel.txt +159 -0
  233. package/mcp-docs/web/components/TabNavigation.txt +160 -0
  234. package/mcp-docs/web/components/TabbedChips.txt +156 -0
  235. package/mcp-docs/web/components/Table.txt +368 -0
  236. package/mcp-docs/web/components/TableBody.txt +84 -0
  237. package/mcp-docs/web/components/TableCaption.txt +103 -0
  238. package/mcp-docs/web/components/TableCell.txt +166 -0
  239. package/mcp-docs/web/components/TableCellFallback.txt +98 -0
  240. package/mcp-docs/web/components/TableFooter.txt +84 -0
  241. package/mcp-docs/web/components/TableHeader.txt +101 -0
  242. package/mcp-docs/web/components/TableRow.txt +141 -0
  243. package/mcp-docs/web/components/Tabs.txt +213 -0
  244. package/mcp-docs/web/components/Tag.txt +305 -0
  245. package/mcp-docs/web/components/Text.txt +233 -0
  246. package/mcp-docs/web/components/TextInput.txt +653 -0
  247. package/mcp-docs/web/components/ThemeProvider.txt +200 -0
  248. package/mcp-docs/web/components/TileButton.txt +159 -0
  249. package/mcp-docs/web/components/Toast.txt +204 -0
  250. package/mcp-docs/web/components/Tooltip.txt +90 -0
  251. package/mcp-docs/web/components/Tour.txt +180 -0
  252. package/mcp-docs/web/components/Tray.txt +289 -0
  253. package/mcp-docs/web/components/UpsellCard.txt +320 -0
  254. package/mcp-docs/web/components/VStack.txt +225 -0
  255. package/mcp-docs/web/components/XAxis.txt +620 -0
  256. package/mcp-docs/web/components/YAxis.txt +549 -0
  257. package/mcp-docs/web/getting-started/introduction.txt +99 -0
  258. package/mcp-docs/web/getting-started/mcp-server.txt +94 -0
  259. package/mcp-docs/web/getting-started/playground.txt +25 -0
  260. package/mcp-docs/web/hooks/useBreakpoints.txt +33 -0
  261. package/mcp-docs/web/hooks/useDimensions.txt +55 -0
  262. package/mcp-docs/web/hooks/useHasMounted.txt +55 -0
  263. package/mcp-docs/web/hooks/useIsoEffect.txt +42 -0
  264. package/mcp-docs/web/hooks/useMediaQuery.txt +94 -0
  265. package/mcp-docs/web/hooks/useOverlayContentContext.txt +217 -0
  266. package/mcp-docs/web/hooks/useScrollBlocker.txt +63 -0
  267. package/mcp-docs/web/hooks/useTheme.txt +105 -0
  268. package/mcp-docs/web/routes.txt +155 -0
  269. package/package.json +1 -1
@@ -0,0 +1,188 @@
1
+ # FullscreenModalLayout
2
+
3
+ Provides the layout structure, overlay, focus trapping, and animations for fullscreen modals. Intended for internal use within Modal component variants.
4
+
5
+ ## Import
6
+
7
+ ```jsx
8
+ import { FullscreenModalLayout } from '@coinbase/cds-web/overlays/modal/FullscreenModalLayout'
9
+ ```
10
+
11
+ ## Props
12
+
13
+ | Prop | Type | Required | Default | Description |
14
+ | --- | --- | --- | --- | --- |
15
+ | `onRequestClose` | `() => void` | Yes | `-` | Callback function fired when modal is closed. |
16
+ | `visible` | `boolean` | Yes | `false false` | Controls visibility of the Modal |
17
+ | `accessibilityLabelledBy` | `string` | No | `-` | On web, maps to aria-labelledby and lists the id(s) of the element(s) that label the element on which the attribute is set. On mobile (Android only), a reference to another element nativeID used to build complex forms. |
18
+ | `disableFocusTrap` | `boolean` | No | `false` | Set disableFocusTrap to disable keyboard listeners responsible for focus trap behavior This can be useful for scenarios like Yubikey 2fa Disables the focus trap to allow normal keyboard navigation. |
19
+ | `disablePortal` | `boolean` | No | `-` | Disable React portal integration |
20
+ | `focusTabIndexElements` | `boolean` | No | `false false` | Allow any element with tabIndex attribute to be focusable in FocusTrap, rather than only focusing specific interactive element types like button. This can be useful when having long content in a Modal. If true, the focus trap will include all elements with tabIndex values in the list of focusable elements. |
21
+ | `key` | `Key \| null` | No | `-` | - |
22
+ | `onDidClose` | `((() => void) & (() => void))` | No | `-` | Callback fired after the component is closed. |
23
+ | `ref` | `RefObject<HTMLDivElement> \| ((instance: HTMLDivElement \| null) => void) \| null` | No | `-` | - |
24
+ | `restoreFocusOnUnmount` | `boolean` | No | `true` | If true, the focus trap will restore focus to the previously focused element when it unmounts. WARNING: If you disable this, you need to ensure that focus is restored properly so it doesnt end up on the body |
25
+ | `role` | `dialog \| alertdialog` | No | `-` | WAI-ARIA Roles |
26
+ | `shouldCloseOnEscPress` | `boolean` | No | `true` | If pressing the esc key should close the modal |
27
+ | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
28
+
29
+
30
+ ## Examples
31
+
32
+ import {
33
+ Box,
34
+ Text,
35
+ PortalProvider,
36
+ Button,
37
+ FullscreenModalLayout,
38
+ VStack,
39
+ HStack,
40
+ LogoMark,
41
+ IconButton,
42
+ } from '@coinbase/cds-web';
43
+ import { loremIpsum } from '@coinbase/cds-common/internal/data/loremIpsum';
44
+ import React, { useCallback, useRef, useState } from 'react';
45
+
46
+ ### Basic usage
47
+
48
+ This component is primarily used internally by the `Modal` component to provide the animated layout for fullscreen modals. It wraps your modal content and manages the overlay, animations, and focus trapping.
49
+
50
+ ```tsx live
51
+ function Example() {
52
+ const [visible, setVisible] = useState(false);
53
+ const triggerRef = useRef(null);
54
+
55
+ const toggleOn = useCallback(() => setVisible(true), []);
56
+ const toggleOff = useCallback(() => setVisible(false), []);
57
+
58
+ const headerContent = (
59
+ <HStack borderedBottom alignItems="center" paddingX={4} paddingY={2}>
60
+ <Box paddingEnd={3} width={80}>
61
+ <LogoMark size={32} />
62
+ </Box>
63
+ <Box flexGrow={1}>
64
+ <Text as="h1" display="block" font="title1">
65
+ Modal
66
+ </Text>
67
+ </Box>
68
+ <Box>
69
+ <IconButton transparent aria-label="Close modal" name="close" onClick={toggleOff} />
70
+ </Box>
71
+ </HStack>
72
+ );
73
+
74
+ const mainContent = (
75
+ <VStack flexGrow={1} overflow="auto" padding={4}>
76
+ <Text as="p" display="block" font="body">
77
+ {loremIpsum}
78
+ </Text>
79
+ </VStack>
80
+ );
81
+
82
+ return (
83
+ <PortalProvider>
84
+ <Button onClick={toggleOn} ref={triggerRef}>
85
+ Open Fullscreen Modal
86
+ </Button>
87
+ {visible && (
88
+ <FullscreenModalLayout
89
+ visible={visible}
90
+ onRequestClose={toggleOff}
91
+ accessibilityLabel="Example Fullscreen Modal"
92
+ >
93
+ <VStack background="bg" height="100%" width="100%">
94
+ {headerContent}
95
+ {mainContent}
96
+ </VStack>
97
+ </FullscreenModalLayout>
98
+ )}
99
+ </PortalProvider>
100
+ );
101
+ }
102
+ ```
103
+
104
+ ### Example composing content
105
+
106
+ This example showcases how `FullscreenModalLayout` can be used to structure content across multiple distinct areas. It demonstrates the arrangement of a custom header, a top panel, a central area with left, center, and right panels, and a bottom panel.
107
+
108
+ ```tsx live
109
+ function AllPanelsExample() {
110
+ const [visible, setVisible] = useState(false);
111
+ const triggerRef = useRef(null);
112
+
113
+ const toggleOn = useCallback(() => setVisible(true), []);
114
+ const toggleOff = useCallback(() => setVisible(false), []);
115
+
116
+ const headerContent = (
117
+ <HStack borderedBottom alignItems="center" paddingX={4} paddingY={2}>
118
+ <Box paddingEnd={3} width={80}>
119
+ <LogoMark size={32} />
120
+ </Box>
121
+ <Box flexGrow={1}>
122
+ <Text as="h1" display="block" font="title1">
123
+ Modal - All Panels
124
+ </Text>
125
+ </Box>
126
+ <Box>
127
+ <IconButton transparent aria-label="Close modal" name="close" onClick={toggleOff} />
128
+ </Box>
129
+ </HStack>
130
+ );
131
+
132
+ const mainModalContent = (
133
+ <VStack flexGrow={1} overflow="hidden">
134
+ <VStack background="bgAlternate" padding={2}>
135
+ <Text as="p" color="fg" display="block" font="body">
136
+ Top Panel (e.g., Breadcrumbs, Progress)
137
+ </Text>
138
+ </VStack>
139
+ <HStack flexGrow={1} overflow="hidden">
140
+ <VStack background="bgAlternate" height="100%" overflow="auto" padding={4} width={360}>
141
+ <Text as="p" display="block" font="body">
142
+ Left Panel
143
+ </Text>
144
+ </VStack>
145
+ <VStack flexGrow={1} overflow="auto" padding={4}>
146
+ <Text as="p" display="block" font="body">
147
+ Center Panel
148
+ <br />
149
+ {loremIpsum}
150
+ </Text>
151
+ </VStack>
152
+ <VStack background="bgAlternate" height="100%" overflow="auto" padding={4} width={360}>
153
+ <Text as="p" display="block" font="body">
154
+ Right Panel
155
+ </Text>
156
+ </VStack>
157
+ </HStack>
158
+ <HStack borderedTop background="bgAlternate" padding={2}>
159
+ <Text as="p" display="block" font="body">
160
+ Bottom Panel (e.g., Footer, Actions)
161
+ </Text>
162
+ </HStack>
163
+ </VStack>
164
+ );
165
+
166
+ return (
167
+ <PortalProvider>
168
+ <Button ref={triggerRef} onClick={toggleOn}>
169
+ Open Modal (All Panels)
170
+ </Button>
171
+ {visible && (
172
+ <FullscreenModalLayout
173
+ onRequestClose={toggleOff}
174
+ visible={visible}
175
+ accessibilityLabel="All Panels Fullscreen Modal"
176
+ >
177
+ <VStack background="bg" height="100%" width="100%">
178
+ {headerContent}
179
+ {mainModalContent}
180
+ </VStack>
181
+ </FullscreenModalLayout>
182
+ )}
183
+ </PortalProvider>
184
+ );
185
+ }
186
+ ```
187
+
188
+
@@ -0,0 +1,237 @@
1
+ # Grid
2
+
3
+ A Box with extra props to make it easier to use the CSS grid API.
4
+
5
+ ## Import
6
+
7
+ ```jsx
8
+ import { Grid } from '@coinbase/cds-web/layout/Grid'
9
+ ```
10
+
11
+ ## Props
12
+
13
+ | Prop | Type | Required | Default | Description |
14
+ | --- | --- | --- | --- | --- |
15
+ | `alignContent` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| space-between \| space-around \| space-evenly>` | No | `-` | - |
16
+ | `alignItems` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
17
+ | `alignSelf` | `ResponsiveProp<center \| normal \| auto \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
18
+ | `as` | `symbol \| object \| style \| svg \| a \| abbr \| address \| area \| article \| aside \| audio \| b \| base \| bdi \| bdo \| big \| blockquote \| body \| br \| button \| canvas \| caption \| center \| cite \| code \| col \| colgroup \| data \| datalist \| dd \| del \| details \| dfn \| dialog \| div \| dl \| dt \| em \| embed \| fieldset \| figcaption \| figure \| footer \| form \| h1 \| h2 \| h3 \| h4 \| h5 \| h6 \| head \| header \| hgroup \| hr \| html \| i \| iframe \| img \| input \| ins \| kbd \| keygen \| label \| legend \| li \| link \| main \| map \| mark \| menu \| menuitem \| meta \| meter \| nav \| noindex \| noscript \| ol \| optgroup \| option \| output \| p \| param \| picture \| pre \| progress \| q \| rp \| rt \| ruby \| s \| samp \| search \| slot \| script \| section \| select \| small \| source \| span \| strong \| sub \| summary \| sup \| table \| template \| tbody \| td \| textarea \| tfoot \| th \| thead \| time \| title \| tr \| track \| u \| ul \| var \| video \| wbr \| webview \| animate \| animateMotion \| animateTransform \| circle \| clipPath \| defs \| desc \| ellipse \| feBlend \| feColorMatrix \| feComponentTransfer \| feComposite \| feConvolveMatrix \| feDiffuseLighting \| feDisplacementMap \| feDistantLight \| feDropShadow \| feFlood \| feFuncA \| feFuncB \| feFuncG \| feFuncR \| feGaussianBlur \| feImage \| feMerge \| feMergeNode \| feMorphology \| feOffset \| fePointLight \| feSpecularLighting \| feSpotLight \| feTile \| feTurbulence \| filter \| foreignObject \| g \| image \| line \| linearGradient \| marker \| mask \| metadata \| mpath \| path \| pattern \| polygon \| polyline \| radialGradient \| rect \| set \| stop \| switch \| text \| textPath \| tspan \| use \| view \| ComponentClass<any, any> \| FunctionComponent<any>` | No | `-` | - |
19
+ | `aspectRatio` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
20
+ | `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 | `-` | - |
21
+ | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
22
+ | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
23
+ | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
24
+ | `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 | `-` | - |
25
+ | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
26
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
27
+ | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
28
+ | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
29
+ | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
30
+ | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
31
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
32
+ | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
33
+ | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
34
+ | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
35
+ | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
36
+ | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
37
+ | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
38
+ | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
39
+ | `bottom` | `ResponsiveProp<Bottom<string \| number>>` | No | `-` | - |
40
+ | `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 | `-` | - |
41
+ | `columnGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
42
+ | `columnMax` | `string \| number` | No | `1fr` | if neither columns or templateColumns are declared, Grid will implicitly lay out grid lines based on available space You can cap the maximum width of each column by passing columnMax |
43
+ | `columnMin` | `string \| number` | No | `-` | if neither columns or templateColumns are declared, Grid will implicitly lay out tracks based on available space You will need to provide a minimum width for each column via columnMin |
44
+ | `columns` | `number` | No | `-` | Explicitly declare the number of columns per row columns will divide up the available space within the parent equally |
45
+ | `dangerouslySetBackground` | `string` | No | `-` | - |
46
+ | `display` | `ResponsiveProp<grid \| revert \| none \| block \| inline \| inline-block \| flex \| inline-flex \| inline-grid \| contents \| flow-root \| list-item>` | No | `grid` | - |
47
+ | `elevation` | `0 \| 1 \| 2` | No | `-` | - |
48
+ | `flexBasis` | `ResponsiveProp<FlexBasis<string \| number>>` | No | `-` | - |
49
+ | `flexDirection` | `ResponsiveProp<column \| row \| row-reverse \| column-reverse>` | No | `-` | - |
50
+ | `flexGrow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
51
+ | `flexShrink` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
52
+ | `flexWrap` | `ResponsiveProp<nowrap \| wrap \| wrap-reverse>` | No | `-` | - |
53
+ | `font` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
54
+ | `fontFamily` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
55
+ | `fontSize` | `ResponsiveProp<FontSize \| inherit>` | No | `-` | - |
56
+ | `fontWeight` | `ResponsiveProp<FontWeight \| inherit>` | No | `-` | - |
57
+ | `gap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
58
+ | `grid` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
59
+ | `gridArea` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
60
+ | `gridAutoColumns` | `ResponsiveProp<GridAutoColumns<string \| number>>` | No | `-` | - |
61
+ | `gridAutoFlow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| row \| column \| dense` | No | `-` | - |
62
+ | `gridAutoRows` | `ResponsiveProp<GridAutoRows<string \| number>>` | No | `-` | - |
63
+ | `gridColumn` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
64
+ | `gridColumnEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
65
+ | `gridColumnStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
66
+ | `gridRow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
67
+ | `gridRowEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
68
+ | `gridRowStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
69
+ | `gridTemplate` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
70
+ | `gridTemplateAreas` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
71
+ | `gridTemplateColumns` | `ResponsiveProp<GridTemplateColumns<string \| number>>` | No | `-` | - |
72
+ | `gridTemplateRows` | `ResponsiveProp<GridTemplateRows<string \| number>>` | No | `-` | - |
73
+ | `height` | `ResponsiveProp<Height<string \| number>>` | No | `-` | - |
74
+ | `justifyContent` | `ResponsiveProp<left \| right \| center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| space-between \| space-around \| space-evenly>` | No | `-` | - |
75
+ | `left` | `ResponsiveProp<Left<string \| number>>` | No | `-` | - |
76
+ | `lineHeight` | `ResponsiveProp<LineHeight \| inherit>` | No | `-` | - |
77
+ | `margin` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
78
+ | `marginBottom` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
79
+ | `marginEnd` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
80
+ | `marginStart` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
81
+ | `marginTop` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
82
+ | `marginX` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
83
+ | `marginY` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
84
+ | `maxHeight` | `ResponsiveProp<MaxHeight<string \| number>>` | No | `-` | - |
85
+ | `maxWidth` | `ResponsiveProp<MaxWidth<string \| number>>` | No | `-` | - |
86
+ | `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
87
+ | `minWidth` | `ResponsiveProp<MinWidth<string \| number>>` | No | `-` | - |
88
+ | `opacity` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
89
+ | `overflow` | `ResponsiveProp<hidden \| auto \| visible \| clip \| scroll>` | No | `-` | - |
90
+ | `padding` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
91
+ | `paddingBottom` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
92
+ | `paddingEnd` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
93
+ | `paddingStart` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
94
+ | `paddingTop` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
95
+ | `paddingX` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
96
+ | `paddingY` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
97
+ | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
98
+ | `position` | `ResponsiveProp<fixed \| static \| relative \| absolute \| sticky>` | No | `-` | - |
99
+ | `ref` | `any` | No | `-` | - |
100
+ | `right` | `ResponsiveProp<Right<string \| number>>` | No | `-` | - |
101
+ | `rowGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
102
+ | `rows` | `number` | No | `-` | - |
103
+ | `style` | `CSSProperties` | No | `-` | - |
104
+ | `templateColumns` | `string` | No | `-` | Explicitly declare the width of each column per row, |
105
+ | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
106
+ | `textAlign` | `ResponsiveProp<center \| start \| end \| justify>` | No | `-` | - |
107
+ | `textDecoration` | `ResponsiveProp<none \| underline \| overline \| line-through \| underline overline \| underline double>` | No | `-` | - |
108
+ | `textTransform` | `ResponsiveProp<capitalize \| lowercase \| none \| uppercase>` | No | `-` | - |
109
+ | `top` | `ResponsiveProp<Top<string \| number>>` | No | `-` | - |
110
+ | `transform` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
111
+ | `userSelect` | `ResponsiveProp<text \| none \| auto \| all>` | No | `-` | - |
112
+ | `visibility` | `ResponsiveProp<hidden \| visible>` | No | `-` | - |
113
+ | `width` | `ResponsiveProp<Width<string \| number>>` | No | `-` | - |
114
+ | `zIndex` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
115
+
116
+
117
+ ## Examples
118
+
119
+ Grid is essentially a specialized [Box](/components/layout/Box) that lets you use the [CSS grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout) API. Even if you're not familiar with CSS grid, Grid includes a few "smart" properties that handle all the grid magic 🪄 under the hood (see [Equal Columns](#equal-columns) and [Implicit Columns](#implicit-columns) examples).
120
+
121
+ Grid can create three kinds of layouts:
122
+
123
+ 1. **Equal columns** 1-12, with support for responsive columns
124
+ 2. **Custom columns** If you're familiar with `grid-template-columns`, this is your swiss army knife prop. See [CSS Grid Track Sizes](https://www.w3.org/TR/css-grid-1/#track-sizes) for the specs.
125
+ 3. **Implicit columns** The Grid will automatically layout as many children as can fit in the given space, and recalculate as the screen size changes.
126
+
127
+ Children of a Grid can be anything, but if you want a child to span multiple columns you'll need to use the GridColumn component. Refer to the [GridColumn](/components/layout/GridColumn) documentation for usage.
128
+
129
+ ### Equal Columns
130
+
131
+ You can pass an integer between 1 and 12 to `columns` to create equal width columns.
132
+
133
+ ```jsx live
134
+ function Example() {
135
+ return (
136
+ <Grid borderColor="line" padding={1} gap={1} columns={6}>
137
+ {Array.from({ length: 6 }).map((_, idx) => (
138
+ <HStack
139
+ background="bgAlternate"
140
+ justifyContent="center"
141
+ alignItems="center"
142
+ padding={2}
143
+ minWidth="100px"
144
+ key={idx}
145
+ >
146
+ <Text as="p">{idx + 1}</Text>
147
+ </HStack>
148
+ ))}
149
+ </Grid>
150
+ );
151
+ }
152
+ ```
153
+
154
+ ### Custom Columns
155
+
156
+ You can pass a string to the `templateColumn` prop with anything you would normally set as the value for the `grid-template-columns` CSS property (see [spec](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns)).
157
+
158
+ You can use this kind of layout to create ratio-based layouts, too, where each column will vary in size based on a proportion of available space. You can specify this with the `fr` unit, ie: if you want to have 1 column that is 2/3 of the available space and another that is 1/3 you would pass `2fr 1fr` to `columns`.
159
+
160
+ ```jsx live
161
+ function Example() {
162
+ function Item({ children, ...props }) {
163
+ return (
164
+ <HStack
165
+ background="bgAlternate"
166
+ justifyContent="center"
167
+ alignItems="center"
168
+ padding={2}
169
+ minWidth="100px"
170
+ {...props}
171
+ >
172
+ {children}
173
+ </HStack>
174
+ );
175
+ }
176
+ return (
177
+ <Grid templateColumns="100px 20% min-content 1fr" borderColor="line" padding={1} gap={1}>
178
+ <Item>
179
+ <Text as="p">100px</Text>
180
+ </Item>
181
+ <Item>
182
+ <Text as="p">20%</Text>
183
+ </Item>
184
+ <Item>
185
+ <Text as="p">min-content</Text>
186
+ </Item>
187
+ <Item>
188
+ <Text as="p">1fr</Text>
189
+ </Item>
190
+ </Grid>
191
+ );
192
+ }
193
+ ```
194
+
195
+ #### Responsive Custom Columns
196
+
197
+ The `templateColumn` prop does not take object values, but you can still leverage the [useBreakpoints](/hooks/useBreakpoints) hook to conditionally render different configurations for `templateColumns`.
198
+
199
+ ### Implicit Columns
200
+
201
+ If you do not pass anything to the `columns` or `templateColumns` props, Grid will automatically lay out children based on available space. When children can no longer fit within a row, it will create additional rows to fit the content. You will have to provide a `columnMin` value, which will determine the minimum track sizing for the columns. You can optionally pass `columnMax` as well.
202
+
203
+ When using implicit columns, Grid will not support `responsiveConfig`. Rather, columns will automatically wrap to the next line, whichs makes them great when you don't know the size of your content but want to make sure your layout is responsive!
204
+
205
+ :::tip
206
+ Implicit columns will create columns of equal size. If your content will vary in size you should use [HStack](/components/layout/HStack) instead and pass `flexWrap="wrap"`.
207
+ :::
208
+
209
+ ```jsx live
210
+ function Example() {
211
+ function Item({ children, ...props }) {
212
+ return (
213
+ <HStack
214
+ background="bgAlternate"
215
+ justifyContent="center"
216
+ alignItems="center"
217
+ padding={2}
218
+ minWidth="100px"
219
+ {...props}
220
+ >
221
+ {children}
222
+ </HStack>
223
+ );
224
+ }
225
+ return (
226
+ <Grid columnMin="100px" borderColor="line" padding={1} gap={1}>
227
+ {Array.from({ length: 12 }).map((_, idx) => (
228
+ <Item key={idx}>
229
+ <Text as="p">{idx + 1}</Text>
230
+ </Item>
231
+ ))}
232
+ </Grid>
233
+ );
234
+ }
235
+ ```
236
+
237
+
@@ -0,0 +1,210 @@
1
+ # GridColumn
2
+
3
+ Place children of a Grid between specific grid lines.
4
+
5
+ ## Import
6
+
7
+ ```jsx
8
+ import { GridColumn } from '@coinbase/cds-web/layout/GridColumn'
9
+ ```
10
+
11
+ ## Props
12
+
13
+ | Prop | Type | Required | Default | Description |
14
+ | --- | --- | --- | --- | --- |
15
+ | `alignContent` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| space-between \| space-around \| space-evenly>` | No | `-` | - |
16
+ | `alignItems` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
17
+ | `alignSelf` | `ResponsiveProp<center \| normal \| auto \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
18
+ | `as` | `symbol \| object \| style \| svg \| a \| abbr \| address \| area \| article \| aside \| audio \| b \| base \| bdi \| bdo \| big \| blockquote \| body \| br \| button \| canvas \| caption \| center \| cite \| code \| col \| colgroup \| data \| datalist \| dd \| del \| details \| dfn \| dialog \| div \| dl \| dt \| em \| embed \| fieldset \| figcaption \| figure \| footer \| form \| h1 \| h2 \| h3 \| h4 \| h5 \| h6 \| head \| header \| hgroup \| hr \| html \| i \| iframe \| img \| input \| ins \| kbd \| keygen \| label \| legend \| li \| link \| main \| map \| mark \| menu \| menuitem \| meta \| meter \| nav \| noindex \| noscript \| ol \| optgroup \| option \| output \| p \| param \| picture \| pre \| progress \| q \| rp \| rt \| ruby \| s \| samp \| search \| slot \| script \| section \| select \| small \| source \| span \| strong \| sub \| summary \| sup \| table \| template \| tbody \| td \| textarea \| tfoot \| th \| thead \| time \| title \| tr \| track \| u \| ul \| var \| video \| wbr \| webview \| animate \| animateMotion \| animateTransform \| circle \| clipPath \| defs \| desc \| ellipse \| feBlend \| feColorMatrix \| feComponentTransfer \| feComposite \| feConvolveMatrix \| feDiffuseLighting \| feDisplacementMap \| feDistantLight \| feDropShadow \| feFlood \| feFuncA \| feFuncB \| feFuncG \| feFuncR \| feGaussianBlur \| feImage \| feMerge \| feMergeNode \| feMorphology \| feOffset \| fePointLight \| feSpecularLighting \| feSpotLight \| feTile \| feTurbulence \| filter \| foreignObject \| g \| image \| line \| linearGradient \| marker \| mask \| metadata \| mpath \| path \| pattern \| polygon \| polyline \| radialGradient \| rect \| set \| stop \| switch \| text \| textPath \| tspan \| use \| view \| ComponentClass<any, any> \| FunctionComponent<any>` | No | `-` | - |
19
+ | `aspectRatio` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
20
+ | `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 | `-` | - |
21
+ | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
22
+ | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
23
+ | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
24
+ | `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 | `-` | - |
25
+ | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
26
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
27
+ | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
28
+ | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
29
+ | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
30
+ | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
31
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
32
+ | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
33
+ | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
34
+ | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
35
+ | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
36
+ | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
37
+ | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
38
+ | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
39
+ | `bottom` | `ResponsiveProp<Bottom<string \| number>>` | No | `-` | - |
40
+ | `colEnd` | `number \| auto` | No | `'auto' (span 1, eg: the next grid line over from colStart)` | - |
41
+ | `colSpan` | `number` | No | `-` | Number of grid lines you want the GridColumn to span |
42
+ | `colStart` | `number \| auto` | No | `'auto' (automatically placed with a span of 1)` | - |
43
+ | `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 | `-` | - |
44
+ | `columnGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
45
+ | `dangerouslySetBackground` | `string` | No | `-` | - |
46
+ | `display` | `ResponsiveProp<grid \| revert \| none \| block \| inline \| inline-block \| flex \| inline-flex \| inline-grid \| contents \| flow-root \| list-item>` | No | `-` | - |
47
+ | `elevation` | `0 \| 1 \| 2` | No | `-` | - |
48
+ | `flexBasis` | `ResponsiveProp<FlexBasis<string \| number>>` | No | `-` | - |
49
+ | `flexDirection` | `ResponsiveProp<column \| row \| row-reverse \| column-reverse>` | No | `-` | - |
50
+ | `flexGrow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
51
+ | `flexShrink` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
52
+ | `flexWrap` | `ResponsiveProp<nowrap \| wrap \| wrap-reverse>` | No | `-` | - |
53
+ | `font` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
54
+ | `fontFamily` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
55
+ | `fontSize` | `ResponsiveProp<FontSize \| inherit>` | No | `-` | - |
56
+ | `fontWeight` | `ResponsiveProp<FontWeight \| inherit>` | No | `-` | - |
57
+ | `gap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
58
+ | `grid` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
59
+ | `gridArea` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
60
+ | `gridAutoColumns` | `ResponsiveProp<GridAutoColumns<string \| number>>` | No | `-` | - |
61
+ | `gridAutoFlow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| row \| column \| dense` | No | `-` | - |
62
+ | `gridAutoRows` | `ResponsiveProp<GridAutoRows<string \| number>>` | No | `-` | - |
63
+ | `gridColumn` | `${number} / ${number} \| ${number} / span ${number}` | No | `-` | Specify the GridColumns size and location Shorthand for colStart and colEnd which specify which grid lines the GridColumn will span |
64
+ | `gridColumnEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
65
+ | `gridColumnStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
66
+ | `gridRow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
67
+ | `gridRowEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
68
+ | `gridRowStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
69
+ | `gridTemplate` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
70
+ | `gridTemplateAreas` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
71
+ | `gridTemplateColumns` | `ResponsiveProp<GridTemplateColumns<string \| number>>` | No | `-` | - |
72
+ | `gridTemplateRows` | `ResponsiveProp<GridTemplateRows<string \| number>>` | No | `-` | - |
73
+ | `height` | `ResponsiveProp<Height<string \| number>>` | No | `-` | - |
74
+ | `justifyContent` | `ResponsiveProp<left \| right \| center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| space-between \| space-around \| space-evenly>` | No | `-` | - |
75
+ | `left` | `ResponsiveProp<Left<string \| number>>` | No | `-` | - |
76
+ | `lineHeight` | `ResponsiveProp<LineHeight \| inherit>` | No | `-` | - |
77
+ | `margin` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
78
+ | `marginBottom` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
79
+ | `marginEnd` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
80
+ | `marginStart` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
81
+ | `marginTop` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
82
+ | `marginX` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
83
+ | `marginY` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
84
+ | `maxHeight` | `ResponsiveProp<MaxHeight<string \| number>>` | No | `-` | - |
85
+ | `maxWidth` | `ResponsiveProp<MaxWidth<string \| number>>` | No | `-` | - |
86
+ | `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
87
+ | `minWidth` | `ResponsiveProp<MinWidth<string \| number>>` | No | `-` | - |
88
+ | `opacity` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
89
+ | `overflow` | `ResponsiveProp<hidden \| auto \| visible \| clip \| scroll>` | No | `-` | - |
90
+ | `padding` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
91
+ | `paddingBottom` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
92
+ | `paddingEnd` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
93
+ | `paddingStart` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
94
+ | `paddingTop` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
95
+ | `paddingX` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
96
+ | `paddingY` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
97
+ | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
98
+ | `position` | `ResponsiveProp<fixed \| static \| relative \| absolute \| sticky>` | No | `-` | - |
99
+ | `ref` | `any` | No | `-` | - |
100
+ | `right` | `ResponsiveProp<Right<string \| number>>` | No | `-` | - |
101
+ | `rowGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
102
+ | `style` | `CSSProperties` | No | `-` | - |
103
+ | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
104
+ | `textAlign` | `ResponsiveProp<center \| start \| end \| justify>` | No | `-` | - |
105
+ | `textDecoration` | `ResponsiveProp<none \| underline \| overline \| line-through \| underline overline \| underline double>` | No | `-` | - |
106
+ | `textTransform` | `ResponsiveProp<capitalize \| lowercase \| none \| uppercase>` | No | `-` | - |
107
+ | `top` | `ResponsiveProp<Top<string \| number>>` | No | `-` | - |
108
+ | `transform` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
109
+ | `userSelect` | `ResponsiveProp<text \| none \| auto \| all>` | No | `-` | - |
110
+ | `visibility` | `ResponsiveProp<hidden \| visible>` | No | `-` | - |
111
+ | `width` | `ResponsiveProp<Width<string \| number>>` | No | `-` | - |
112
+ | `zIndex` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
113
+
114
+
115
+ ## Examples
116
+
117
+ GridColumns can be used to explicitly place children of a [Grid](/components/layout/Grid) between specified grid lines (the vertical and horizontal lines that make up a Grid).
118
+
119
+ :::warning
120
+ GridColumn will _only_ work as a direct descendent of a Grid component.
121
+ :::
122
+
123
+ It uses the `grid-column` [CSS property](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column) under the hood. If you want to access the `grid-column` property directly, you can use `gridColumn` prop; otherwise `colStart` and `colEnd` are syntactic sugar for the property.
124
+
125
+ :::tip
126
+ "Grid lines" are not columns, rather they are the grid itself that is created whenever you specify `columns` or `templateColumns` within a Grid.
127
+ You can see these grid lines if you inspect a Grid in your Dev Tools and click the "grid" tag next to your DOM element.
128
+ :::
129
+
130
+ You can specify `colStart` and/or `colEnd` which represent the grid lines where the column will start and end, respectively, eg: `colStart={1} colEnd={3}` which will span 2 columns in the parent Grid. Or you can use `gridColumn` which is shorthand for each property separated by a `/`, eg: `gridColumn="1 / -1"` where `-1` is shorthand for the last grid line in the row.
131
+
132
+ :::tip
133
+ Grid grid lines are `1` indexed, so the last grid line in the row will be `numberOfColumns + 1`
134
+ :::
135
+
136
+ ```jsx live
137
+ function GridColumnExample() {
138
+ return (
139
+ <Grid gap={0.5} columns={12}>
140
+ {Array.from({ length: 12 }).map((_, idx) => (
141
+ <GridColumn background="fgPrimary" padding={2} colStart={1} colEnd={idx + 2} key={idx} />
142
+ ))}
143
+ </Grid>
144
+ );
145
+ }
146
+ ```
147
+
148
+ ### Full Bleed Columns
149
+
150
+ You can use GridColumn to create "full bleed" layouts. This is a common layout where most content will not be edge to edge with the parent Grid, rather, content will only occupy columns in the center of the Grid buffered by gutters on either end; some columns may "break" from this and become full bleed spanning the entire width of the layout. You can use GridColumn to accomplish this within the same parent Grid.
151
+
152
+ ```jsx live
153
+ function FullBleedExample() {
154
+ function Item({ children, ...props }) {
155
+ return (
156
+ <HStack
157
+ background="bgAlternate"
158
+ justifyContent="center"
159
+ alignItems="center"
160
+ padding={2}
161
+ minWidth="100px"
162
+ {...props}
163
+ >
164
+ {children}
165
+ </HStack>
166
+ );
167
+ }
168
+ return (
169
+ <Grid gap={0.5} templateColumns="100px 1fr 100px">
170
+ <Item background="bg">
171
+ <TextBody as="p">Gutter</TextBody>
172
+ </Item>
173
+ <Item>
174
+ <TextBody as="p">Body</TextBody>
175
+ </Item>
176
+ <Item background="bg">
177
+ <TextBody as="p">Gutter</TextBody>
178
+ </Item>
179
+ <GridColumn
180
+ // this is shorthand for first grid line to the last
181
+ // alternatively, you could also use colSpan={3}
182
+ // if you know how many columns there are
183
+ gridColumn="1 / -1"
184
+ justifyContent="center"
185
+ background="bgAlternate"
186
+ padding={2}
187
+ >
188
+ <TextBody as="p">Full Bleed</TextBody>
189
+ </GridColumn>
190
+ </Grid>
191
+ );
192
+ }
193
+ ```
194
+
195
+ ### A11y
196
+
197
+ By default GridColumn is not accessibility aware as it renders a standard `div`. We highly encourage the use of semantic elements so that screen readers can easily infer intent. This can be achieved through the `as` and `role` props.
198
+
199
+ ```jsx
200
+ <Grid columns={5} as="ol" role="list">
201
+ <GridColumn colSpan={3} as="li" role="list-item">
202
+ 1
203
+ </GridColumn>
204
+ <GridColumn colSpan={2} as="li" role="list-item">
205
+ 2
206
+ </GridColumn>
207
+ </Grid>
208
+ ```
209
+
210
+