@commercetools/nimbus 0.0.1 → 0.0.3-alpha.2

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 (302) hide show
  1. package/dist/index.d.ts +1412 -0
  2. package/dist/index.js +22451 -0
  3. package/dist/index.js.map +1 -0
  4. package/dist/index.umd.cjs +27 -0
  5. package/dist/index.umd.cjs.map +1 -0
  6. package/package.json +74 -40
  7. package/.storybook/apca-check/index.ts +0 -150
  8. package/.storybook/main.ts +0 -64
  9. package/.storybook/preview.tsx +0 -92
  10. package/.storybook/vitest.setup.ts +0 -13
  11. package/docs/architecture-decisions/adr-0001-consumer-component-apis.md +0 -177
  12. package/docs/architecture-decisions/adr-0002-compound-component-extraction.md +0 -82
  13. package/src/components/accordion/accordion-context.tsx +0 -17
  14. package/src/components/accordion/accordion.mdx +0 -172
  15. package/src/components/accordion/accordion.recipe.tsx +0 -98
  16. package/src/components/accordion/accordion.slots.tsx +0 -39
  17. package/src/components/accordion/accordion.stories.tsx +0 -188
  18. package/src/components/accordion/accordion.tsx +0 -16
  19. package/src/components/accordion/accordion.types.tsx +0 -54
  20. package/src/components/accordion/components/accordion-content.tsx +0 -28
  21. package/src/components/accordion/components/accordion-group.tsx +0 -27
  22. package/src/components/accordion/components/accordion-header.tsx +0 -63
  23. package/src/components/accordion/components/accordion-item.tsx +0 -87
  24. package/src/components/accordion/index.ts +0 -2
  25. package/src/components/alert/alert.mdx +0 -92
  26. package/src/components/alert/alert.recipe.tsx +0 -65
  27. package/src/components/alert/alert.slots.tsx +0 -46
  28. package/src/components/alert/alert.stories.tsx +0 -308
  29. package/src/components/alert/alert.tsx +0 -18
  30. package/src/components/alert/alert.types.tsx +0 -70
  31. package/src/components/alert/components/alert.actions.tsx +0 -27
  32. package/src/components/alert/components/alert.description.tsx +0 -27
  33. package/src/components/alert/components/alert.dismiss-button.tsx +0 -41
  34. package/src/components/alert/components/alert.root.tsx +0 -92
  35. package/src/components/alert/components/alert.title.tsx +0 -29
  36. package/src/components/alert/index.ts +0 -2
  37. package/src/components/avatar/avatar.mdx +0 -80
  38. package/src/components/avatar/avatar.recipe.tsx +0 -36
  39. package/src/components/avatar/avatar.slots.tsx +0 -16
  40. package/src/components/avatar/avatar.stories.tsx +0 -136
  41. package/src/components/avatar/avatar.tsx +0 -34
  42. package/src/components/avatar/avatar.types.ts +0 -33
  43. package/src/components/avatar/index.ts +0 -2
  44. package/src/components/badge/badge.mdx +0 -91
  45. package/src/components/badge/badge.recipe.tsx +0 -72
  46. package/src/components/badge/badge.slots.tsx +0 -8
  47. package/src/components/badge/badge.stories.tsx +0 -124
  48. package/src/components/badge/badge.tsx +0 -35
  49. package/src/components/badge/badge.types.tsx +0 -40
  50. package/src/components/badge/index.ts +0 -2
  51. package/src/components/bleed/bleed.tsx +0 -1
  52. package/src/components/bleed/index.ts +0 -1
  53. package/src/components/box/box.mdx +0 -115
  54. package/src/components/box/box.stories.tsx +0 -71
  55. package/src/components/box/box.tsx +0 -11
  56. package/src/components/box/index.ts +0 -1
  57. package/src/components/button/button.mdx +0 -169
  58. package/src/components/button/button.recipe.ts +0 -185
  59. package/src/components/button/button.slots.tsx +0 -45
  60. package/src/components/button/button.stories.tsx +0 -369
  61. package/src/components/button/button.tsx +0 -37
  62. package/src/components/button/button.types.ts +0 -14
  63. package/src/components/button/index.ts +0 -2
  64. package/src/components/card/card.mdx +0 -92
  65. package/src/components/card/card.recipe.tsx +0 -71
  66. package/src/components/card/card.slots.tsx +0 -50
  67. package/src/components/card/card.stories.tsx +0 -175
  68. package/src/components/card/card.tsx +0 -9
  69. package/src/components/card/card.types.ts +0 -22
  70. package/src/components/card/components/card.content.tsx +0 -29
  71. package/src/components/card/components/card.header.tsx +0 -28
  72. package/src/components/card/components/card.root.tsx +0 -62
  73. package/src/components/card/index.ts +0 -2
  74. package/src/components/checkbox/checkbox.mdx +0 -78
  75. package/src/components/checkbox/checkbox.recipe.tsx +0 -116
  76. package/src/components/checkbox/checkbox.slots.tsx +0 -33
  77. package/src/components/checkbox/checkbox.stories.tsx +0 -200
  78. package/src/components/checkbox/checkbox.tsx +0 -77
  79. package/src/components/checkbox/checkbox.types.tsx +0 -22
  80. package/src/components/checkbox/index.ts +0 -2
  81. package/src/components/code/code.mdx +0 -17
  82. package/src/components/code/code.recipe.ts +0 -63
  83. package/src/components/code/code.tsx +0 -1
  84. package/src/components/code/index.ts +0 -1
  85. package/src/components/dialog/dialog.mdx +0 -20
  86. package/src/components/dialog/dialog.recipe.ts +0 -254
  87. package/src/components/dialog/dialog.tsx +0 -61
  88. package/src/components/dialog/index.ts +0 -1
  89. package/src/components/em/em.mdx +0 -17
  90. package/src/components/em/em.tsx +0 -1
  91. package/src/components/em/index.ts +0 -1
  92. package/src/components/flex/flex.mdx +0 -41
  93. package/src/components/flex/flex.tsx +0 -1
  94. package/src/components/flex/index.ts +0 -1
  95. package/src/components/grid/grid.mdx +0 -156
  96. package/src/components/grid/grid.stories.tsx +0 -151
  97. package/src/components/grid/grid.tsx +0 -29
  98. package/src/components/grid/index.ts +0 -1
  99. package/src/components/heading/heading.mdx +0 -23
  100. package/src/components/heading/heading.recipe.ts +0 -49
  101. package/src/components/heading/heading.tsx +0 -1
  102. package/src/components/heading/index.ts +0 -1
  103. package/src/components/highlight/highlight.mdx +0 -18
  104. package/src/components/highlight/highlight.tsx +0 -1
  105. package/src/components/highlight/index.ts +0 -1
  106. package/src/components/icon-button/icon-button.mdx +0 -98
  107. package/src/components/icon-button/icon-button.stories.tsx +0 -188
  108. package/src/components/icon-button/icon-button.tsx +0 -21
  109. package/src/components/icon-button/icon-button.types.tsx +0 -10
  110. package/src/components/icon-button/index.ts +0 -2
  111. package/src/components/index.ts +0 -33
  112. package/src/components/input/index.ts +0 -1
  113. package/src/components/input/input.mdx +0 -20
  114. package/src/components/input/input.recipe.ts +0 -95
  115. package/src/components/input/input.tsx +0 -1
  116. package/src/components/input-group/index.ts +0 -1
  117. package/src/components/input-group/input-group.mdx +0 -20
  118. package/src/components/input-group/input-group.tsx +0 -44
  119. package/src/components/kbd/index.ts +0 -1
  120. package/src/components/kbd/kbd.mdx +0 -18
  121. package/src/components/kbd/kbd.recipe.ts +0 -57
  122. package/src/components/kbd/kbd.tsx +0 -1
  123. package/src/components/link/index.ts +0 -2
  124. package/src/components/link/link.mdx +0 -77
  125. package/src/components/link/link.recipe.ts +0 -52
  126. package/src/components/link/link.slots.tsx +0 -29
  127. package/src/components/link/link.stories.tsx +0 -204
  128. package/src/components/link/link.tsx +0 -38
  129. package/src/components/link/link.types.tsx +0 -26
  130. package/src/components/list/index.ts +0 -1
  131. package/src/components/list/list.mdx +0 -18
  132. package/src/components/list/list.recipe.ts +0 -68
  133. package/src/components/list/list.tsx +0 -9
  134. package/src/components/loading-spinner/index.ts +0 -2
  135. package/src/components/loading-spinner/loading-spinner.mdx +0 -92
  136. package/src/components/loading-spinner/loading-spinner.recipe.tsx +0 -70
  137. package/src/components/loading-spinner/loading-spinner.slots.tsx +0 -38
  138. package/src/components/loading-spinner/loading-spinner.stories.tsx +0 -97
  139. package/src/components/loading-spinner/loading-spinner.tsx +0 -50
  140. package/src/components/loading-spinner/loading-spinner.types.tsx +0 -21
  141. package/src/components/nimbus-provider/color-mode.tsx +0 -32
  142. package/src/components/nimbus-provider/index.ts +0 -2
  143. package/src/components/nimbus-provider/nimbus-provider.mdx +0 -21
  144. package/src/components/nimbus-provider/nimbus-provider.tsx +0 -51
  145. package/src/components/select/components/select.clear-button.tsx +0 -31
  146. package/src/components/select/components/select.option-group.tsx +0 -48
  147. package/src/components/select/components/select.option.tsx +0 -21
  148. package/src/components/select/components/select.options.tsx +0 -23
  149. package/src/components/select/components/select.root.tsx +0 -81
  150. package/src/components/select/index.ts +0 -2
  151. package/src/components/select/select.mdx +0 -170
  152. package/src/components/select/select.recipe.tsx +0 -216
  153. package/src/components/select/select.slots.tsx +0 -58
  154. package/src/components/select/select.stories.tsx +0 -841
  155. package/src/components/select/select.tsx +0 -18
  156. package/src/components/select/select.types.tsx +0 -37
  157. package/src/components/simple-grid/index.ts +0 -1
  158. package/src/components/simple-grid/simple-grid.mdx +0 -133
  159. package/src/components/simple-grid/simple-grid.stories.tsx +0 -143
  160. package/src/components/simple-grid/simple-grid.tsx +0 -31
  161. package/src/components/stack/index.ts +0 -1
  162. package/src/components/stack/stack.mdx +0 -88
  163. package/src/components/stack/stack.stories.tsx +0 -82
  164. package/src/components/stack/stack.tsx +0 -15
  165. package/src/components/table/index.ts +0 -1
  166. package/src/components/table/table.mdx +0 -23
  167. package/src/components/table/table.recipe.ts +0 -170
  168. package/src/components/table/table.tsx +0 -43
  169. package/src/components/text/index.ts +0 -1
  170. package/src/components/text/text.mdx +0 -244
  171. package/src/components/text/text.tsx +0 -23
  172. package/src/components/text-input/index.ts +0 -2
  173. package/src/components/text-input/text-input.mdx +0 -118
  174. package/src/components/text-input/text-input.recipe.tsx +0 -68
  175. package/src/components/text-input/text-input.slots.tsx +0 -24
  176. package/src/components/text-input/text-input.stories.tsx +0 -282
  177. package/src/components/text-input/text-input.tsx +0 -39
  178. package/src/components/text-input/text-input.types.ts +0 -7
  179. package/src/components/toggle-button-group/components/toggle-button-group.button.tsx +0 -14
  180. package/src/components/toggle-button-group/components/toggle-button-group.root.tsx +0 -15
  181. package/src/components/toggle-button-group/index.ts +0 -2
  182. package/src/components/toggle-button-group/toggle-button-group.mdx +0 -94
  183. package/src/components/toggle-button-group/toggle-button-group.recipe.tsx +0 -64
  184. package/src/components/toggle-button-group/toggle-button-group.slots.tsx +0 -26
  185. package/src/components/toggle-button-group/toggle-button-group.stories.tsx +0 -311
  186. package/src/components/toggle-button-group/toggle-button-group.tsx +0 -12
  187. package/src/components/toggle-button-group/toggle-button-group.types.tsx +0 -62
  188. package/src/components/tooltip/index.ts +0 -4
  189. package/src/components/tooltip/make-element-focusable.stories.tsx +0 -56
  190. package/src/components/tooltip/make-element-focusable.tsx +0 -57
  191. package/src/components/tooltip/tooltip-trigger.stories.tsx +0 -157
  192. package/src/components/tooltip/tooltip-trigger.tsx +0 -15
  193. package/src/components/tooltip/tooltip.mdx +0 -48
  194. package/src/components/tooltip/tooltip.recipe.ts +0 -26
  195. package/src/components/tooltip/tooltip.slots.ts +0 -35
  196. package/src/components/tooltip/tooltip.stories.tsx +0 -139
  197. package/src/components/tooltip/tooltip.tsx +0 -31
  198. package/src/components/tooltip/tooltip.types.ts +0 -44
  199. package/src/components/visually-hidden/index.ts +0 -1
  200. package/src/components/visually-hidden/visually-hidden.mdx +0 -61
  201. package/src/components/visually-hidden/visually-hidden.stories.tsx +0 -124
  202. package/src/components/visually-hidden/visually-hidden.tsx +0 -18
  203. package/src/docs/accessibility.mdx +0 -21
  204. package/src/docs/background.mdx +0 -154
  205. package/src/docs/border.mdx +0 -226
  206. package/src/docs/changelog.mdx +0 -17
  207. package/src/docs/components-layout.mdx +0 -22
  208. package/src/docs/components.mdx +0 -17
  209. package/src/docs/data-display.mdx +0 -23
  210. package/src/docs/display.mdx +0 -55
  211. package/src/docs/effects.mdx +0 -73
  212. package/src/docs/feedback.mdx +0 -22
  213. package/src/docs/filters.mdx +0 -268
  214. package/src/docs/flex-and-grid.mdx +0 -445
  215. package/src/docs/forms.mdx +0 -22
  216. package/src/docs/generated/index.mdx +0 -16
  217. package/src/docs/getting-started.mdx +0 -17
  218. package/src/docs/home.mdx +0 -56
  219. package/src/docs/hooks.mdx +0 -16
  220. package/src/docs/inputs.mdx +0 -21
  221. package/src/docs/installation.mdx +0 -60
  222. package/src/docs/interactivity.mdx +0 -278
  223. package/src/docs/known-issues.mdx +0 -19
  224. package/src/docs/layout.mdx +0 -301
  225. package/src/docs/list.mdx +0 -82
  226. package/src/docs/markdown.mdx +0 -234
  227. package/src/docs/media.mdx +0 -22
  228. package/src/docs/naivgation.mdx +0 -22
  229. package/src/docs/playground.mdx +0 -16
  230. package/src/docs/rfcs-component-structure-rfcs.mdx +0 -17
  231. package/src/docs/rfcs-component-structure.mdx +0 -74
  232. package/src/docs/rfcs-hook-structure.mdx +0 -59
  233. package/src/docs/sizing.mdx +0 -210
  234. package/src/docs/spacing.mdx +0 -193
  235. package/src/docs/style-props-typography.mdx +0 -373
  236. package/src/docs/style-props.mdx +0 -15
  237. package/src/docs/svg.mdx +0 -58
  238. package/src/docs/tables.mdx +0 -95
  239. package/src/docs/toc.mdx +0 -39
  240. package/src/docs/tokens/animations.mdx +0 -68
  241. package/src/docs/tokens/aspect-ratios.mdx +0 -21
  242. package/src/docs/tokens/blurs.mdx +0 -20
  243. package/src/docs/tokens/borders.mdx +0 -25
  244. package/src/docs/tokens/breakpoints.mdx +0 -35
  245. package/src/docs/tokens/colors.mdx +0 -86
  246. package/src/docs/tokens/cursors.mdx +0 -21
  247. package/src/docs/tokens/radii.mdx +0 -23
  248. package/src/docs/tokens/shadows.mdx +0 -21
  249. package/src/docs/tokens/sizes.mdx +0 -54
  250. package/src/docs/tokens/spacing.mdx +0 -35
  251. package/src/docs/tokens/typography.mdx +0 -61
  252. package/src/docs/tokens/z-indices.mdx +0 -23
  253. package/src/docs/tokens-other.mdx +0 -17
  254. package/src/docs/tokens.mdx +0 -16
  255. package/src/docs/transforms.mdx +0 -150
  256. package/src/docs/transitions.mdx +0 -164
  257. package/src/docs/typography.mdx +0 -17
  258. package/src/docs/utilities.mdx +0 -17
  259. package/src/hooks/index.ts +0 -2
  260. package/src/hooks/use-copy-to-clipboard/use-copy-to-clipboard.mdx +0 -54
  261. package/src/hooks/use-copy-to-clipboard/use-copy-to-clipboard.ts +0 -1
  262. package/src/hooks/use-hotkeys/use-hotkeys.mdx +0 -48
  263. package/src/hooks/use-hotkeys/use-hotkeys.stories.tsx +0 -69
  264. package/src/hooks/use-hotkeys/use-hotkeys.ts +0 -1
  265. package/src/index.ts +0 -3
  266. package/src/test/utils.tsx +0 -20
  267. package/src/theme/animation-styles.ts +0 -52
  268. package/src/theme/breakpoints.ts +0 -32
  269. package/src/theme/global-css.ts +0 -53
  270. package/src/theme/index.ts +0 -35
  271. package/src/theme/keyframes.ts +0 -192
  272. package/src/theme/layer-styles.ts +0 -12
  273. package/src/theme/recipes/index.ts +0 -21
  274. package/src/theme/semantic-tokens/colors.ts +0 -55
  275. package/src/theme/semantic-tokens/index.ts +0 -9
  276. package/src/theme/semantic-tokens/radii.ts +0 -3
  277. package/src/theme/semantic-tokens/shadows.ts +0 -4
  278. package/src/theme/slot-recipes/index.ts +0 -15
  279. package/src/theme/text-styles.ts +0 -8
  280. package/src/theme/tokens/animations.ts +0 -4
  281. package/src/theme/tokens/aspect-ratios.ts +0 -5
  282. package/src/theme/tokens/blurs.ts +0 -5
  283. package/src/theme/tokens/borders.ts +0 -4
  284. package/src/theme/tokens/colors.ts +0 -8
  285. package/src/theme/tokens/cursor.ts +0 -4
  286. package/src/theme/tokens/durations.ts +0 -4
  287. package/src/theme/tokens/easings.ts +0 -4
  288. package/src/theme/tokens/font-sizes.ts +0 -4
  289. package/src/theme/tokens/font-weights.ts +0 -4
  290. package/src/theme/tokens/fonts.ts +0 -4
  291. package/src/theme/tokens/index.ts +0 -57
  292. package/src/theme/tokens/letter-spacings.ts +0 -24
  293. package/src/theme/tokens/line-heights.ts +0 -4
  294. package/src/theme/tokens/radii.ts +0 -4
  295. package/src/theme/tokens/sizes.ts +0 -120
  296. package/src/theme/tokens/spacing.ts +0 -4
  297. package/src/theme/tokens/z-index.ts +0 -4
  298. package/src/utils/extractStyleProps.ts +0 -26
  299. package/src/utils/fixedForwardRef.ts +0 -17
  300. package/tsconfig.json +0 -38
  301. package/vite.config.ts +0 -54
  302. package/vitest.config.ts +0 -50
@@ -1,154 +0,0 @@
1
- ---
2
- id: Style Props-Background
3
- title: Background
4
- description:
5
- JSX style props for styling background colors, gradients, and images.
6
- documentState: InitialDraft
7
- order: 999
8
- menu:
9
- - Style Props
10
- - Background
11
- tags:
12
- - document
13
- ---
14
-
15
- # Background
16
-
17
- JSX style props for styling background colors, gradients, and images.
18
-
19
- ## Background Attachment
20
-
21
- Use `bgAttachment` to control the attachment of a background image.
22
-
23
- ```jsx
24
- <Box bgAttachment="fixed" bgImage="url(...)" />
25
- ```
26
-
27
- | Prop | CSS Property | Token Category |
28
- | -------------------------------------- | ----------------------- | -------------- |
29
- | `bgAttachment`, `backgroundAttachment` | `background-attachment` | - |
30
-
31
- ## Background Blend Mode
32
-
33
- Use `bgBlendMode` prop to control how an element's background image should blend
34
- with the its background color.
35
-
36
- ```jsx
37
- <Box bgBlendMode="multiply" bgColor="red.200" bgImage="url(...)" />
38
- ```
39
-
40
- ## Background Clip
41
-
42
- Use `bgClip` to control the clipping of a background image.
43
-
44
- ```jsx
45
- <Box bgClip="border-box" bgImage="url(...)" />
46
- ```
47
-
48
- | Prop | CSS Property | Token Category |
49
- | -------------------------- | ----------------- | -------------- |
50
- | `bgClip`, `backgroundClip` | `background-clip` | - |
51
-
52
- ## Background Color
53
-
54
- Use `bg`, `bgColor`, or `backgroundColor` props to set the background color of
55
- an element.
56
-
57
- ```jsx
58
- <Box bg="red.200" />
59
- <Box bgColor="red.200" />
60
-
61
- // with opacity modifier
62
- <Box bg="blue.200/30" />
63
- <Box bgColor="blue.200/30" />
64
- ```
65
-
66
- | Prop | CSS Property | Token Category |
67
- | ---------------------------- | ------------------ | -------------- |
68
- | `bg`, `background` | `background` | `colors` |
69
- | `bgColor`, `backgroundColor` | `background-color` | `colors` |
70
-
71
- ## Background Origin
72
-
73
- Use `bgOrigin` or `backgroundOrigin` to control the origin of a background
74
- image.
75
-
76
- ```jsx
77
- <Box bgOrigin="border-box" bgImage="url(...)" />
78
- ```
79
-
80
- | Prop | CSS Property | Token Category |
81
- | ------------------------------ | ------------------- | -------------- |
82
- | `bgOrigin`, `backgroundOrigin` | `background-origin` | - |
83
-
84
- ## Background Position
85
-
86
- Properties for controlling the src and position of a background image.
87
-
88
- ```jsx
89
- <Box bgImage="url(...)" bgPosition="center" />
90
- ```
91
-
92
- | Prop | CSS Property | Token Category |
93
- | ------------------------------------ | ------------------ | -------------- |
94
- | `bgPosition`, `backgroundPosition` | `background-image` | - |
95
- | `bgPositionX`, `backgroundPositionX` | `background-image` | - |
96
- | `bgPositionY`, `backgroundPositionY` | `background-image` | - |
97
-
98
- ## Background Repeat
99
-
100
- Use `bgRepeat` or `backgroundRepeat` to control the repeat of a background
101
- image.
102
-
103
- ```jsx
104
- <Box bgRepeat="no-repeat" bgImage="url(...)" />
105
- ```
106
-
107
- | Prop | CSS Property | Token Category |
108
- | ------------------------------ | ------------------- | -------------- |
109
- | `bgRepeat`, `backgroundRepeat` | `background-repeat` | - |
110
-
111
- ## Background Size
112
-
113
- Use `bgSize` or `backgroundSize` to control the size of a background image.
114
-
115
- ```jsx
116
- <Box bgSize="cover" bgImage="url(...)" />
117
- ```
118
-
119
- | Prop | CSS Property | Token Category |
120
- | -------------------------- | ----------------- | -------------- |
121
- | `bgSize`, `backgroundSize` | `background-size` | - |
122
-
123
- ## Background Image
124
-
125
- Use `bgImage` or `backgroundImage` to set the background image of an element.
126
-
127
- ```jsx
128
- <Box bgImage="url(...)" />
129
- <Box bgImage="radial-gradient(circle, #0000 45%, #000f 48%)" />
130
- <Box bgImage="linear-gradient(black, white)" />
131
-
132
- // with token reference
133
- <Box bgImage="linear-gradient({colors.red.200}, {colors.blue.200})" />
134
- ```
135
-
136
- | Prop | CSS Property | Token Category |
137
- | ---------------------------- | ------------------ | -------------- |
138
- | `bgImage`, `backgroundImage` | `background-image` | assets |
139
-
140
- ## Background Gradient
141
-
142
- Properties to create a background gradient based on color stops.
143
-
144
- ```jsx
145
- <Box bgGradient="to-r" gradientFrom="red.200" gradientTo="blue.200" />
146
- ```
147
-
148
- | Prop | CSS Property | Token Category |
149
- | -------------- | ------------------ | -------------- |
150
- | `bgGradient` | `background-image` | `gradients` |
151
- | `textGradient` | `background-image` | `gradients` |
152
- | `gradientFrom` | `--gradient-from` | `colors` |
153
- | `gradientTo` | `--gradient-to` | `colors` |
154
- | `gradientVia` | `--gradient-via` | `colors` |
@@ -1,226 +0,0 @@
1
- ---
2
- id: Style Props-Border
3
- title: Border
4
- description: JSX style props for styling border and border radius.
5
- documentState: InitialDraft
6
- order: 999
7
- menu:
8
- - Style Props
9
- - Border
10
- tags:
11
- - document
12
- ---
13
-
14
- # Border
15
-
16
- JSX style props for styling border and border radius.
17
-
18
- ## Border Radius
19
-
20
- ### All sides
21
-
22
- Use the `rounded` or `borderRadius` props to apply border radius on all sides of
23
- an element.
24
-
25
- ```jsx
26
- <Box borderRadius="400" />
27
- <Box rounded="400" /> // shorthand
28
- ```
29
-
30
- | Prop | CSS Property | Token Category |
31
- | ------------------------- | --------------- | -------------- |
32
- | `rounded`, `borderRadius` | `border-radius` | `radii` |
33
-
34
- ### Specific sides
35
-
36
- Use the `rounded{Left,Right,Top,Bottom}` or
37
- `border{Left,Right,Top,Bottom}Radius` prop, to apply border radius on a specific
38
- side of an element.
39
-
40
- ```jsx
41
- <Box borderTopRadius="md" />
42
- <Box roundedTop="md" /> // shorthand
43
-
44
- <Box borderLeftRadius="md" />
45
- <Box roundedLeft="md" /> // shorthand
46
- ```
47
-
48
- Use the logical equivalent to make the border radius adapt based on the text
49
- direction.
50
-
51
- ```jsx
52
- <Box roundedStart="md" />
53
- <Box roundedEnd="md" />
54
- ```
55
-
56
- | Prop | CSS Property | Token Category |
57
- | ------------------------------------- | ------------------------------------------------------ | -------------- |
58
- | `roundedLeft`, `borderLeftRadius` | `border-left-radius` | `radii` |
59
- | `roundedRight`, `borderRightRadius` | `border-right-radius` | `radii` |
60
- | `roundedTop`, `borderTopRadius` | `border-top-radius` | `radii` |
61
- | `roundedBottom`, `borderBottomRadius` | `border-bottom-radius` | `radii` |
62
- | `roundedStart`, `borderStartRadius` | `border-start-start-radius`, `border-end-start-radius` | `radii` |
63
- | `roundedEnd`, `borderEndRadius` | `border-start-end-radius`, `border-end-end-radius` | `radii` |
64
-
65
- ### Specific corners
66
-
67
- Use the `border{Top,Bottom}{Left,Right}Radius` properties, or the shorthand
68
- equivalent to round a specific corner.
69
-
70
- ```jsx
71
- <Box borderTopLeftRadius="md" />
72
- <Box roundedTopLeft="md" /> // shorthand
73
- ```
74
-
75
- Use the logical properties to adapt based on the text direction.
76
-
77
- ```jsx
78
- <Box borderStartStartRadius="md" />
79
- <Box roundedStartStart="md" /> // shorthand
80
- ```
81
-
82
- | Prop | CSS Property | Token Category |
83
- | ---------------------------------------- | ---------------------------- | -------------- |
84
- | `roundedTopLeft`,`borderTopLeftRadius` | `border-top-left-radius` | `radii` |
85
- | `roundedTopRight`,`borderTopRight` | `border-top-right-radius` | `radii` |
86
- | `roundedBottomRight`,`borderBottomRight` | `border-bottom-right-radius` | `radii` |
87
- | `roundedBottomLeft`,`borderBottomLeft` | `border-bottom-left-radius` | `radii` |
88
-
89
- ## Border Width
90
-
91
- ### All sides
92
-
93
- Use the `borderWidth` prop to apply border width on all sides of an element.
94
-
95
- > Chakra applies `borderStyle: solid` and a global border color by default.
96
- > Specifying a border width is sufficient to apply the border.
97
-
98
- ```jsx
99
- <Box borderWidth="1px" />
100
- ```
101
-
102
- | Prop | CSS Property | Token Category |
103
- | ------------- | -------------- | -------------- |
104
- | `borderWidth` | `border-width` | `borderWidths` |
105
-
106
- ### Specific sides
107
-
108
- Use the `border{Left|Right|Top|Bottom}Width` prop to apply border width on a
109
- specific side of an element.
110
-
111
- ```jsx
112
- <Box borderTopWidth="1px" />
113
- <Box borderLeftWidth="1px" />
114
- ```
115
-
116
- Use the logical equivalent to make the border width adapt based on the text
117
- direction.
118
-
119
- ```jsx
120
- <Box borderInlineStartWidth="1px" />
121
- <Box borderInlineWidth="1px" /> // shorthand
122
- ```
123
-
124
- | Prop | CSS Property | Token Category |
125
- | --------------------------------------------- | --------------------------- | -------------- |
126
- | `borderTopWidth` | `border-top-width` | `borderWidths` |
127
- | `borderLeftWidth` | `border-left-width` | `borderWidths` |
128
- | `borderRightWidth` | `border-right-width` | `borderWidths` |
129
- | `borderBottomWidth` | `border-bottom-width` | `borderWidths` |
130
- | `borderStartWidth` , `borderInlineStartWidth` | `border-{start+end}-width` |
131
- | `borderEndWidth` , `borderInlineEndWidth` | `border-{start+end}-width` |
132
- | `borderXWidth` , `borderInlineWidth` | `border-{left,right}-width` | `borderWidths` |
133
- | `borderYWidth` , `borderBlockWidth` | `border-{top,bottom}-width` | `borderWidths` |
134
-
135
- ## Border Color
136
-
137
- ### All sides
138
-
139
- Use the `borderColor` prop to apply border color on all sides of an element.
140
-
141
- ```jsx
142
- <Box borderColor="red.400" />
143
-
144
- // with opacity modifier
145
- <Box borderColor="red.400/20" />
146
- ```
147
-
148
- ### Specific sides
149
-
150
- Use the `border{Left,Right,Top,Bottom}Color` prop to apply border color on a
151
- specific side of an element.
152
-
153
- ```jsx
154
- <Box borderTopColor="red.400" />
155
- <Box borderLeftColor="red.400" />
156
- ```
157
-
158
- Use the logical properties to adapt based on the text direction.
159
-
160
- ```jsx
161
- <Box borderStartColor="red.400" />
162
- <Box borderEndColor="red.400" />
163
- ```
164
-
165
- | Prop | CSS Property | Token Category |
166
- | --------------------------------------------- | -------------------------- | -------------- |
167
- | `borderColor` | `border-color` | `colors` |
168
- | `borderTopColor` | `border-top-color` | `colors` |
169
- | `borderLeftColor` | `border-left-color` | `colors` |
170
- | `borderRightColor` | `border-right-color` | `colors` |
171
- | `borderBottomColor` | `border-bottom-color` | `colors` |
172
- | `borderStartColor` , `borderInlineStartColor` | `border-{start,end}-color` | `colors` |
173
- | `borderEndColor` , `borderInlineEndColor` | `border-{start,end}-color` | `colors` |
174
- | `borderXColor`, `borderInlineColor` | `border-inline-color` | `colors` |
175
- | `borderYColor`, `borderBlockColor` | `border-block-color` | `colors` |
176
-
177
- ## Divide Width
178
-
179
- Use the `divide{X,Y}Width` prop to apply border width between elements. It uses
180
- the CSS selector `> * + *` to apply the `border*` properties.
181
-
182
- ```jsx
183
- <Box divideXWidth="1px">
184
- <Box>1</Box>
185
- <Box>2</Box>
186
- </Box>
187
-
188
- <Box divideYWidth="1px">
189
- <Box>1</Box>
190
- <Box>2</Box>
191
- </Box>
192
- ```
193
-
194
- | Prop | CSS Property | Token Category |
195
- | ------------- | ----------------------------------- | -------------- |
196
- | `divideWidth` | `border-{inline,block}-start-width` | `borderWidths` |
197
-
198
- ## Divide Color
199
-
200
- Use the `divideColor` prop to apply border color between elements.
201
-
202
- ```jsx
203
- <Box divideColor="red.400">
204
- <Box>1</Box>
205
- <Box>2</Box>
206
- </Box>
207
- ```
208
-
209
- | Prop | CSS Property | Token Category |
210
- | ------------- | ---------------- | -------------- |
211
- | `divideColor` | `--divide-color` | `colors` |
212
-
213
- ## Divide Style
214
-
215
- Use the `divideStyle` prop to apply border style between elements.
216
-
217
- ```jsx
218
- <Box divideX="2px" divideStyle="dashed">
219
- <Box>1</Box>
220
- <Box>2</Box>
221
- </Box>
222
- ```
223
-
224
- | Prop | CSS Property | Token Category |
225
- | ------------- | ---------------- | -------------- |
226
- | `divideStyle` | `--divide-style` | `borderStyle` |
@@ -1,17 +0,0 @@
1
- ---
2
- id: Home-Changelog
3
- title: Changelog
4
- description: List of updates, improvements, and bug fixes.
5
- documentState: InitialDraft
6
- order: 3
7
- menu:
8
- - Home
9
- - Changelog
10
- tags:
11
- - document
12
- icon: History
13
- ---
14
-
15
- # Changelog
16
-
17
- List of updates, improvements, and bug fixes.
@@ -1,22 +0,0 @@
1
- ---
2
- id: Layout
3
- title: Layout
4
- description: Components that structure the content on the page.
5
- documentState: InitialDraft
6
- order: 1
7
- menu:
8
- - Components
9
- - Layout
10
- tags:
11
- - layout
12
- icon: ViewComfy
13
- ---
14
-
15
- # Layout
16
-
17
- Components that structure the content on the page.
18
-
19
- - **Grid Systems**: e.g., Row, Column, Container.
20
- - **Flexbox Utilities**: e.g., Box, Spacer, Stack.
21
- - **Positioning**: e.g., Absolute, RelativeWrapper.
22
- - **Responsive Design**: e.g., Breakpoints, ResponsiveContainer.
@@ -1,17 +0,0 @@
1
- ---
2
- id: Components
3
- title: Components
4
- description:
5
- React components for building robust and visually appealing applications.
6
- documentState: InitialDraft
7
- order: 3
8
- menu:
9
- - Components
10
- tags:
11
- - components
12
- - react
13
- ---
14
-
15
- # Components
16
-
17
- [Add a cool category overview component]
@@ -1,23 +0,0 @@
1
- ---
2
- id: Components-Data Display
3
- title: Data Display
4
- description: Components for presenting data or visual content.
5
- documentState: InitialDraft
6
- order: 7
7
- menu:
8
- - Components
9
- - Data Display
10
- tags:
11
- - document
12
- icon: TableView
13
- ---
14
-
15
- # Data Display
16
-
17
- Components for presenting data or visual content.
18
-
19
- - **Tables**: e.g., DataTable, TableRow, TableHeader.
20
- - **Cards**: e.g., Card, CardHeader, CardBody.
21
- - **Lists**: e.g., List, ListItem.
22
- - **Charts & Graphs**: e.g., LineChart, BarChart.
23
- - **Badges & Tags**: e.g., Badge, Tag.
@@ -1,55 +0,0 @@
1
- ---
2
- id: Style Props-Display
3
- title: Display
4
- description: Style props for styling display of an element.
5
- documentState: InitialDraft
6
- order: 999
7
- menu:
8
- - Style Props
9
- - Display
10
- tags:
11
- - document
12
- ---
13
-
14
- # Display
15
-
16
- Style props for styling display of an element.
17
-
18
- ## Display Property
19
-
20
- ```jsx
21
- <Box display="flex" />
22
-
23
- // responsive
24
- <Box display={{ base: "none", md: "block" }} />
25
- ```
26
-
27
- | Prop | CSS Property | Token Category |
28
- | --------- | ------------ | -------------- |
29
- | `display` | `display` | - |
30
-
31
- ## Hiding Elements
32
-
33
- ### Hide From
34
-
35
- Use the `hideFrom` prop to hide an element from a specific breakpoint.
36
-
37
- ```jsx
38
- <Box display="flex" hideFrom="md" />
39
- ```
40
-
41
- | Prop | CSS Property | Token Category |
42
- | ---------- | ------------ | -------------- |
43
- | `hideFrom` | `display` | `breakpoints` |
44
-
45
- ### Hide Below
46
-
47
- Use the `hideBelow` prop to hide an element below a specific breakpoint.
48
-
49
- ```jsx
50
- <Box display="flex" hideBelow="md" />
51
- ```
52
-
53
- | Prop | CSS Property | Token Category |
54
- | ----------- | ------------ | -------------- |
55
- | `hideBelow` | `display` | `breakpoints` |
@@ -1,73 +0,0 @@
1
- ---
2
- id: Style Props-Effects
3
- title: Effects
4
- description: JSX style props for styling box shadows, opacity, and more
5
- documentState: InitialDraft
6
- order: 999
7
- menu:
8
- - Style Props
9
- - Effects
10
- tags:
11
- - document
12
- ---
13
-
14
- # Effects
15
-
16
- JSX style props for styling box shadows, opacity, and more
17
-
18
- ## Box Shadow
19
-
20
- Use the `shadow` or `boxShadow` prop to apply a box shadow to an element.
21
-
22
- ```jsx
23
- // hardcoded values
24
- <Box shadow="12px 12px 2px 1px rgba(0, 0, 255, .2)" />
25
-
26
- // token values
27
- <Box shadow="lg" />
28
- ```
29
-
30
- | Prop | CSS Property | Token Category |
31
- | ---------------------- | ---------------- | -------------- |
32
- | `shadows`, `boxShadow` | `box-shadow` | `shadows` |
33
- | `shadowColor` | `--shadow-color` | `colors` |
34
-
35
- ## Box Shadow Color
36
-
37
- Use the `shadowColor` prop to set the color of a box shadow. This prop maps to
38
- the `--shadow-color` CSS variable.
39
-
40
- ```jsx
41
- <Box shadow="60px -16px var(--shadow-color)" shadowColor="red" />
42
- ```
43
-
44
- | Prop | CSS Property | Token Category |
45
- | ------------- | ---------------- | -------------- |
46
- | `shadowColor` | `--shadow-color` | `colors` |
47
-
48
- ## Opacity
49
-
50
- Use the `opacity` prop to set the opacity of an element.
51
-
52
- ```jsx
53
- <Box opacity="0.5" />
54
- ```
55
-
56
- | Prop | CSS Property | Token Category |
57
- | --------- | ------------ | -------------- |
58
- | `opacity` | `opacity` | `opacity` |
59
-
60
- ## Mix Blend Mode
61
-
62
- Use the `mixBlendMode` prop to control how an element's content should be
63
- blended with the background.
64
-
65
- ```jsx
66
- <Box bg="red.400">
67
- <Image src="..." mixBlendMode="hard-light" />
68
- </Box>
69
- ```
70
-
71
- | Prop | CSS Property | Token Category |
72
- | -------------- | ---------------- | -------------- |
73
- | `mixBlendMode` | `mix-blend-mode` | - |
@@ -1,22 +0,0 @@
1
- ---
2
- id: Components-Feedback
3
- title: Feedback
4
- description: Components for providing user feedback.
5
- documentState: InitialDraft
6
- order: 5
7
- menu:
8
- - Components
9
- - Feedback
10
- tags:
11
- - document
12
- icon: CommentBank
13
- ---
14
-
15
- # Feedback
16
-
17
- Components for providing user feedback.
18
-
19
- - **Notifications**: e.g., Toast, Alert.
20
- - **Status Indicators**: e.g., Spinner, ProgressBar.
21
- - **Modals & Overlays**: e.g., Modal, Tooltip, Popover.
22
- - **Validation**: e.g., ErrorMessage, SuccessMessage.