@commercetools/nimbus 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1412 -0
- package/dist/index.js +11183 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.cjs +27 -0
- package/dist/index.umd.cjs.map +1 -0
- package/package.json +33 -6
- package/.storybook/apca-check/index.ts +0 -150
- package/.storybook/main.ts +0 -64
- package/.storybook/preview.tsx +0 -92
- package/.storybook/vitest.setup.ts +0 -13
- package/docs/architecture-decisions/adr-0001-consumer-component-apis.md +0 -177
- package/docs/architecture-decisions/adr-0002-compound-component-extraction.md +0 -82
- package/src/components/accordion/accordion-context.tsx +0 -17
- package/src/components/accordion/accordion.mdx +0 -172
- package/src/components/accordion/accordion.recipe.tsx +0 -98
- package/src/components/accordion/accordion.slots.tsx +0 -39
- package/src/components/accordion/accordion.stories.tsx +0 -188
- package/src/components/accordion/accordion.tsx +0 -16
- package/src/components/accordion/accordion.types.tsx +0 -54
- package/src/components/accordion/components/accordion-content.tsx +0 -28
- package/src/components/accordion/components/accordion-group.tsx +0 -27
- package/src/components/accordion/components/accordion-header.tsx +0 -63
- package/src/components/accordion/components/accordion-item.tsx +0 -87
- package/src/components/accordion/index.ts +0 -2
- package/src/components/alert/alert.mdx +0 -92
- package/src/components/alert/alert.recipe.tsx +0 -65
- package/src/components/alert/alert.slots.tsx +0 -46
- package/src/components/alert/alert.stories.tsx +0 -308
- package/src/components/alert/alert.tsx +0 -18
- package/src/components/alert/alert.types.tsx +0 -70
- package/src/components/alert/components/alert.actions.tsx +0 -27
- package/src/components/alert/components/alert.description.tsx +0 -27
- package/src/components/alert/components/alert.dismiss-button.tsx +0 -41
- package/src/components/alert/components/alert.root.tsx +0 -92
- package/src/components/alert/components/alert.title.tsx +0 -29
- package/src/components/alert/index.ts +0 -2
- package/src/components/avatar/avatar.mdx +0 -80
- package/src/components/avatar/avatar.recipe.tsx +0 -36
- package/src/components/avatar/avatar.slots.tsx +0 -16
- package/src/components/avatar/avatar.stories.tsx +0 -136
- package/src/components/avatar/avatar.tsx +0 -34
- package/src/components/avatar/avatar.types.ts +0 -33
- package/src/components/avatar/index.ts +0 -2
- package/src/components/badge/badge.mdx +0 -91
- package/src/components/badge/badge.recipe.tsx +0 -72
- package/src/components/badge/badge.slots.tsx +0 -8
- package/src/components/badge/badge.stories.tsx +0 -124
- package/src/components/badge/badge.tsx +0 -35
- package/src/components/badge/badge.types.tsx +0 -40
- package/src/components/badge/index.ts +0 -2
- package/src/components/bleed/bleed.tsx +0 -1
- package/src/components/bleed/index.ts +0 -1
- package/src/components/box/box.mdx +0 -115
- package/src/components/box/box.stories.tsx +0 -71
- package/src/components/box/box.tsx +0 -11
- package/src/components/box/index.ts +0 -1
- package/src/components/button/button.mdx +0 -169
- package/src/components/button/button.recipe.ts +0 -185
- package/src/components/button/button.slots.tsx +0 -45
- package/src/components/button/button.stories.tsx +0 -369
- package/src/components/button/button.tsx +0 -37
- package/src/components/button/button.types.ts +0 -14
- package/src/components/button/index.ts +0 -2
- package/src/components/card/card.mdx +0 -92
- package/src/components/card/card.recipe.tsx +0 -71
- package/src/components/card/card.slots.tsx +0 -50
- package/src/components/card/card.stories.tsx +0 -175
- package/src/components/card/card.tsx +0 -9
- package/src/components/card/card.types.ts +0 -22
- package/src/components/card/components/card.content.tsx +0 -29
- package/src/components/card/components/card.header.tsx +0 -28
- package/src/components/card/components/card.root.tsx +0 -62
- package/src/components/card/index.ts +0 -2
- package/src/components/checkbox/checkbox.mdx +0 -78
- package/src/components/checkbox/checkbox.recipe.tsx +0 -116
- package/src/components/checkbox/checkbox.slots.tsx +0 -33
- package/src/components/checkbox/checkbox.stories.tsx +0 -200
- package/src/components/checkbox/checkbox.tsx +0 -77
- package/src/components/checkbox/checkbox.types.tsx +0 -22
- package/src/components/checkbox/index.ts +0 -2
- package/src/components/code/code.mdx +0 -17
- package/src/components/code/code.recipe.ts +0 -63
- package/src/components/code/code.tsx +0 -1
- package/src/components/code/index.ts +0 -1
- package/src/components/dialog/dialog.mdx +0 -20
- package/src/components/dialog/dialog.recipe.ts +0 -254
- package/src/components/dialog/dialog.tsx +0 -61
- package/src/components/dialog/index.ts +0 -1
- package/src/components/em/em.mdx +0 -17
- package/src/components/em/em.tsx +0 -1
- package/src/components/em/index.ts +0 -1
- package/src/components/flex/flex.mdx +0 -41
- package/src/components/flex/flex.tsx +0 -1
- package/src/components/flex/index.ts +0 -1
- package/src/components/grid/grid.mdx +0 -156
- package/src/components/grid/grid.stories.tsx +0 -151
- package/src/components/grid/grid.tsx +0 -29
- package/src/components/grid/index.ts +0 -1
- package/src/components/heading/heading.mdx +0 -23
- package/src/components/heading/heading.recipe.ts +0 -49
- package/src/components/heading/heading.tsx +0 -1
- package/src/components/heading/index.ts +0 -1
- package/src/components/highlight/highlight.mdx +0 -18
- package/src/components/highlight/highlight.tsx +0 -1
- package/src/components/highlight/index.ts +0 -1
- package/src/components/icon-button/icon-button.mdx +0 -98
- package/src/components/icon-button/icon-button.stories.tsx +0 -188
- package/src/components/icon-button/icon-button.tsx +0 -21
- package/src/components/icon-button/icon-button.types.tsx +0 -10
- package/src/components/icon-button/index.ts +0 -2
- package/src/components/index.ts +0 -33
- package/src/components/input/index.ts +0 -1
- package/src/components/input/input.mdx +0 -20
- package/src/components/input/input.recipe.ts +0 -95
- package/src/components/input/input.tsx +0 -1
- package/src/components/input-group/index.ts +0 -1
- package/src/components/input-group/input-group.mdx +0 -20
- package/src/components/input-group/input-group.tsx +0 -44
- package/src/components/kbd/index.ts +0 -1
- package/src/components/kbd/kbd.mdx +0 -18
- package/src/components/kbd/kbd.recipe.ts +0 -57
- package/src/components/kbd/kbd.tsx +0 -1
- package/src/components/link/index.ts +0 -2
- package/src/components/link/link.mdx +0 -77
- package/src/components/link/link.recipe.ts +0 -52
- package/src/components/link/link.slots.tsx +0 -29
- package/src/components/link/link.stories.tsx +0 -204
- package/src/components/link/link.tsx +0 -38
- package/src/components/link/link.types.tsx +0 -26
- package/src/components/list/index.ts +0 -1
- package/src/components/list/list.mdx +0 -18
- package/src/components/list/list.recipe.ts +0 -68
- package/src/components/list/list.tsx +0 -9
- package/src/components/loading-spinner/index.ts +0 -2
- package/src/components/loading-spinner/loading-spinner.mdx +0 -92
- package/src/components/loading-spinner/loading-spinner.recipe.tsx +0 -70
- package/src/components/loading-spinner/loading-spinner.slots.tsx +0 -38
- package/src/components/loading-spinner/loading-spinner.stories.tsx +0 -97
- package/src/components/loading-spinner/loading-spinner.tsx +0 -50
- package/src/components/loading-spinner/loading-spinner.types.tsx +0 -21
- package/src/components/nimbus-provider/color-mode.tsx +0 -32
- package/src/components/nimbus-provider/index.ts +0 -2
- package/src/components/nimbus-provider/nimbus-provider.mdx +0 -21
- package/src/components/nimbus-provider/nimbus-provider.tsx +0 -51
- package/src/components/select/components/select.clear-button.tsx +0 -31
- package/src/components/select/components/select.option-group.tsx +0 -48
- package/src/components/select/components/select.option.tsx +0 -21
- package/src/components/select/components/select.options.tsx +0 -23
- package/src/components/select/components/select.root.tsx +0 -81
- package/src/components/select/index.ts +0 -2
- package/src/components/select/select.mdx +0 -170
- package/src/components/select/select.recipe.tsx +0 -216
- package/src/components/select/select.slots.tsx +0 -58
- package/src/components/select/select.stories.tsx +0 -841
- package/src/components/select/select.tsx +0 -18
- package/src/components/select/select.types.tsx +0 -37
- package/src/components/simple-grid/index.ts +0 -1
- package/src/components/simple-grid/simple-grid.mdx +0 -133
- package/src/components/simple-grid/simple-grid.stories.tsx +0 -143
- package/src/components/simple-grid/simple-grid.tsx +0 -31
- package/src/components/stack/index.ts +0 -1
- package/src/components/stack/stack.mdx +0 -88
- package/src/components/stack/stack.stories.tsx +0 -82
- package/src/components/stack/stack.tsx +0 -15
- package/src/components/table/index.ts +0 -1
- package/src/components/table/table.mdx +0 -23
- package/src/components/table/table.recipe.ts +0 -170
- package/src/components/table/table.tsx +0 -43
- package/src/components/text/index.ts +0 -1
- package/src/components/text/text.mdx +0 -244
- package/src/components/text/text.tsx +0 -23
- package/src/components/text-input/index.ts +0 -2
- package/src/components/text-input/text-input.mdx +0 -118
- package/src/components/text-input/text-input.recipe.tsx +0 -68
- package/src/components/text-input/text-input.slots.tsx +0 -24
- package/src/components/text-input/text-input.stories.tsx +0 -282
- package/src/components/text-input/text-input.tsx +0 -39
- package/src/components/text-input/text-input.types.ts +0 -7
- package/src/components/toggle-button-group/components/toggle-button-group.button.tsx +0 -14
- package/src/components/toggle-button-group/components/toggle-button-group.root.tsx +0 -15
- package/src/components/toggle-button-group/index.ts +0 -2
- package/src/components/toggle-button-group/toggle-button-group.mdx +0 -94
- package/src/components/toggle-button-group/toggle-button-group.recipe.tsx +0 -64
- package/src/components/toggle-button-group/toggle-button-group.slots.tsx +0 -26
- package/src/components/toggle-button-group/toggle-button-group.stories.tsx +0 -311
- package/src/components/toggle-button-group/toggle-button-group.tsx +0 -12
- package/src/components/toggle-button-group/toggle-button-group.types.tsx +0 -62
- package/src/components/tooltip/index.ts +0 -4
- package/src/components/tooltip/make-element-focusable.stories.tsx +0 -56
- package/src/components/tooltip/make-element-focusable.tsx +0 -57
- package/src/components/tooltip/tooltip-trigger.stories.tsx +0 -157
- package/src/components/tooltip/tooltip-trigger.tsx +0 -15
- package/src/components/tooltip/tooltip.mdx +0 -48
- package/src/components/tooltip/tooltip.recipe.ts +0 -26
- package/src/components/tooltip/tooltip.slots.ts +0 -35
- package/src/components/tooltip/tooltip.stories.tsx +0 -139
- package/src/components/tooltip/tooltip.tsx +0 -31
- package/src/components/tooltip/tooltip.types.ts +0 -44
- package/src/components/visually-hidden/index.ts +0 -1
- package/src/components/visually-hidden/visually-hidden.mdx +0 -61
- package/src/components/visually-hidden/visually-hidden.stories.tsx +0 -124
- package/src/components/visually-hidden/visually-hidden.tsx +0 -18
- package/src/docs/accessibility.mdx +0 -21
- package/src/docs/background.mdx +0 -154
- package/src/docs/border.mdx +0 -226
- package/src/docs/changelog.mdx +0 -17
- package/src/docs/components-layout.mdx +0 -22
- package/src/docs/components.mdx +0 -17
- package/src/docs/data-display.mdx +0 -23
- package/src/docs/display.mdx +0 -55
- package/src/docs/effects.mdx +0 -73
- package/src/docs/feedback.mdx +0 -22
- package/src/docs/filters.mdx +0 -268
- package/src/docs/flex-and-grid.mdx +0 -445
- package/src/docs/forms.mdx +0 -22
- package/src/docs/generated/index.mdx +0 -16
- package/src/docs/getting-started.mdx +0 -17
- package/src/docs/home.mdx +0 -56
- package/src/docs/hooks.mdx +0 -16
- package/src/docs/inputs.mdx +0 -21
- package/src/docs/installation.mdx +0 -60
- package/src/docs/interactivity.mdx +0 -278
- package/src/docs/known-issues.mdx +0 -19
- package/src/docs/layout.mdx +0 -301
- package/src/docs/list.mdx +0 -82
- package/src/docs/markdown.mdx +0 -234
- package/src/docs/media.mdx +0 -22
- package/src/docs/naivgation.mdx +0 -22
- package/src/docs/playground.mdx +0 -16
- package/src/docs/rfcs-component-structure-rfcs.mdx +0 -17
- package/src/docs/rfcs-component-structure.mdx +0 -74
- package/src/docs/rfcs-hook-structure.mdx +0 -59
- package/src/docs/sizing.mdx +0 -210
- package/src/docs/spacing.mdx +0 -193
- package/src/docs/style-props-typography.mdx +0 -373
- package/src/docs/style-props.mdx +0 -15
- package/src/docs/svg.mdx +0 -58
- package/src/docs/tables.mdx +0 -95
- package/src/docs/toc.mdx +0 -39
- package/src/docs/tokens/animations.mdx +0 -68
- package/src/docs/tokens/aspect-ratios.mdx +0 -21
- package/src/docs/tokens/blurs.mdx +0 -20
- package/src/docs/tokens/borders.mdx +0 -25
- package/src/docs/tokens/breakpoints.mdx +0 -35
- package/src/docs/tokens/colors.mdx +0 -86
- package/src/docs/tokens/cursors.mdx +0 -21
- package/src/docs/tokens/radii.mdx +0 -23
- package/src/docs/tokens/shadows.mdx +0 -21
- package/src/docs/tokens/sizes.mdx +0 -54
- package/src/docs/tokens/spacing.mdx +0 -35
- package/src/docs/tokens/typography.mdx +0 -61
- package/src/docs/tokens/z-indices.mdx +0 -23
- package/src/docs/tokens-other.mdx +0 -17
- package/src/docs/tokens.mdx +0 -16
- package/src/docs/transforms.mdx +0 -150
- package/src/docs/transitions.mdx +0 -164
- package/src/docs/typography.mdx +0 -17
- package/src/docs/utilities.mdx +0 -17
- package/src/hooks/index.ts +0 -2
- package/src/hooks/use-copy-to-clipboard/use-copy-to-clipboard.mdx +0 -54
- package/src/hooks/use-copy-to-clipboard/use-copy-to-clipboard.ts +0 -1
- package/src/hooks/use-hotkeys/use-hotkeys.mdx +0 -48
- package/src/hooks/use-hotkeys/use-hotkeys.stories.tsx +0 -69
- package/src/hooks/use-hotkeys/use-hotkeys.ts +0 -1
- package/src/index.ts +0 -3
- package/src/test/utils.tsx +0 -20
- package/src/theme/animation-styles.ts +0 -52
- package/src/theme/breakpoints.ts +0 -32
- package/src/theme/global-css.ts +0 -53
- package/src/theme/index.ts +0 -35
- package/src/theme/keyframes.ts +0 -192
- package/src/theme/layer-styles.ts +0 -12
- package/src/theme/recipes/index.ts +0 -21
- package/src/theme/semantic-tokens/colors.ts +0 -55
- package/src/theme/semantic-tokens/index.ts +0 -9
- package/src/theme/semantic-tokens/radii.ts +0 -3
- package/src/theme/semantic-tokens/shadows.ts +0 -4
- package/src/theme/slot-recipes/index.ts +0 -15
- package/src/theme/text-styles.ts +0 -8
- package/src/theme/tokens/animations.ts +0 -4
- package/src/theme/tokens/aspect-ratios.ts +0 -5
- package/src/theme/tokens/blurs.ts +0 -5
- package/src/theme/tokens/borders.ts +0 -4
- package/src/theme/tokens/colors.ts +0 -8
- package/src/theme/tokens/cursor.ts +0 -4
- package/src/theme/tokens/durations.ts +0 -4
- package/src/theme/tokens/easings.ts +0 -4
- package/src/theme/tokens/font-sizes.ts +0 -4
- package/src/theme/tokens/font-weights.ts +0 -4
- package/src/theme/tokens/fonts.ts +0 -4
- package/src/theme/tokens/index.ts +0 -57
- package/src/theme/tokens/letter-spacings.ts +0 -24
- package/src/theme/tokens/line-heights.ts +0 -4
- package/src/theme/tokens/radii.ts +0 -4
- package/src/theme/tokens/sizes.ts +0 -120
- package/src/theme/tokens/spacing.ts +0 -4
- package/src/theme/tokens/z-index.ts +0 -4
- package/src/utils/extractStyleProps.ts +0 -26
- package/src/utils/fixedForwardRef.ts +0 -17
- package/tsconfig.json +0 -38
- package/vite.config.ts +0 -54
- package/vitest.config.ts +0 -50
package/src/docs/filters.mdx
DELETED
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: Style Props-Filters
|
|
3
|
-
title: Filters
|
|
4
|
-
description: JSX style props for applying various filters to elements.
|
|
5
|
-
documentState: InitialDraft
|
|
6
|
-
order: 999
|
|
7
|
-
menu:
|
|
8
|
-
- Style Props
|
|
9
|
-
- Filters
|
|
10
|
-
tags:
|
|
11
|
-
- document
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Filters
|
|
15
|
-
|
|
16
|
-
JSX style props for applying various filters to elements.
|
|
17
|
-
|
|
18
|
-
## Filter
|
|
19
|
-
|
|
20
|
-
Use the `filter` prop to apply visual effects like blur or color shift to an
|
|
21
|
-
element.
|
|
22
|
-
|
|
23
|
-
```jsx
|
|
24
|
-
<Box filter="blur(5px)" />
|
|
25
|
-
<Box filter="grayscale(80%)" />
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
| Prop | CSS Property | Token Category |
|
|
29
|
-
| -------- | ------------ | -------------- |
|
|
30
|
-
| `filter` | `filter` | - |
|
|
31
|
-
|
|
32
|
-
## Blur
|
|
33
|
-
|
|
34
|
-
Use the `blur` prop to apply a blur effect to an element. The requirement for
|
|
35
|
-
this prop is to set the `filter` prop to `auto`.
|
|
36
|
-
|
|
37
|
-
```jsx
|
|
38
|
-
// hardcoded value
|
|
39
|
-
<Box filter="auto" blur="5px" />
|
|
40
|
-
|
|
41
|
-
// token value
|
|
42
|
-
<Box filter="auto" blur="sm" />
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
| Prop | CSS Property | Token Category |
|
|
46
|
-
| ------ | ------------ | -------------- |
|
|
47
|
-
| `blur` | `--blur` | `blurs` |
|
|
48
|
-
|
|
49
|
-
## Contrast
|
|
50
|
-
|
|
51
|
-
Use the `contrast` prop to apply a contrast effect to an element. The
|
|
52
|
-
requirement for this prop is to use the `filter` prop and set it to `auto`.
|
|
53
|
-
|
|
54
|
-
```jsx
|
|
55
|
-
<Box filter="auto" contrast="0.3" />
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
| Prop | CSS Property | Token Category |
|
|
59
|
-
| ---------- | ------------ | -------------- |
|
|
60
|
-
| `contrast` | `--contrast` | - |
|
|
61
|
-
|
|
62
|
-
## Drop Shadow
|
|
63
|
-
|
|
64
|
-
Use the `dropShadow` prop to apply a drop shadow effect to an element. The
|
|
65
|
-
requirement for this prop is to use the `filter` prop and set it to `auto`.
|
|
66
|
-
|
|
67
|
-
```jsx
|
|
68
|
-
<Box filter="auto" dropShadow="0px 0px 10px rgba(0, 0, 0, 0.5)" />
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
| Prop | CSS Property | Token Category |
|
|
72
|
-
| ------------ | --------------- | -------------- |
|
|
73
|
-
| `dropShadow` | `--drop-shadow` | - |
|
|
74
|
-
|
|
75
|
-
## Grayscale
|
|
76
|
-
|
|
77
|
-
Use the `grayscale` prop to apply a grayscale effect to an element. The
|
|
78
|
-
requirement for this prop is to use the `filter` prop and set it to `auto`.
|
|
79
|
-
|
|
80
|
-
```jsx
|
|
81
|
-
<Box filter="auto" grayscale="64%" />
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
| Prop | CSS Property | Token Category |
|
|
85
|
-
| ----------- | ------------- | -------------- |
|
|
86
|
-
| `grayscale` | `--grayscale` | - |
|
|
87
|
-
|
|
88
|
-
## Hue Rotate
|
|
89
|
-
|
|
90
|
-
Use the `hueRotate` prop to apply a hue rotate effect to an element. The
|
|
91
|
-
requirement for this prop is to use the `filter` prop and set it to `auto`.
|
|
92
|
-
|
|
93
|
-
```jsx
|
|
94
|
-
<Box filter="auto" hueRotate="30deg" />
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
| Prop | CSS Property | Token Category |
|
|
98
|
-
| ----------- | -------------- | -------------- |
|
|
99
|
-
| `hueRotate` | `--hue-rotate` | - |
|
|
100
|
-
|
|
101
|
-
## Invert
|
|
102
|
-
|
|
103
|
-
Use the `invert` prop to apply an invert effect to an element. The requirement
|
|
104
|
-
for this prop is to use the `filter` prop and set it to `auto`.
|
|
105
|
-
|
|
106
|
-
```jsx
|
|
107
|
-
<Box filter="auto" invert="40%" />
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
| Prop | CSS Property | Token Category |
|
|
111
|
-
| -------- | ------------ | -------------- |
|
|
112
|
-
| `invert` | `--invert` | - |
|
|
113
|
-
|
|
114
|
-
## Saturate
|
|
115
|
-
|
|
116
|
-
Use the `saturate` prop to apply a saturate effect to an element. The
|
|
117
|
-
requirement for this prop is to use the `filter` prop and set it to `auto`.
|
|
118
|
-
|
|
119
|
-
```jsx
|
|
120
|
-
<Box filter="auto" saturate="0.4" />
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
| Prop | CSS Property | Token Category |
|
|
124
|
-
| ---------- | ------------ | -------------- |
|
|
125
|
-
| `saturate` | `--saturate` | - |
|
|
126
|
-
|
|
127
|
-
## Sepia
|
|
128
|
-
|
|
129
|
-
Use the `sepia` prop to apply a sepia effect to an element. The requirement for
|
|
130
|
-
this prop is to use the `filter` prop and set it to `auto`.
|
|
131
|
-
|
|
132
|
-
```jsx
|
|
133
|
-
<Box filter="auto" sepia="0.4" />
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
| Prop | CSS Property | Token Category |
|
|
137
|
-
| ------- | ------------ | -------------- |
|
|
138
|
-
| `sepia` | `--sepia` | - |
|
|
139
|
-
|
|
140
|
-
## Backdrop Filter
|
|
141
|
-
|
|
142
|
-
Use the `backdropFilter` prop to apply visual effects like blur or color shift
|
|
143
|
-
to the area behind an element. This creates a translucent effect.
|
|
144
|
-
|
|
145
|
-
```jsx
|
|
146
|
-
<Box backdropFilter="blur(5px)" />
|
|
147
|
-
<Box backdropFilter="grayscale(80%)" />
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
| Prop | CSS Property | Token Category |
|
|
151
|
-
| ---------------- | ----------------- | -------------- |
|
|
152
|
-
| `backdropFilter` | `backdrop-filter` | - |
|
|
153
|
-
|
|
154
|
-
## Backdrop Blur
|
|
155
|
-
|
|
156
|
-
Use the `backdropBlur` prop to apply a blur effect to the area behind an
|
|
157
|
-
element. The requirement for this prop is to set the `backdropFilter` prop to
|
|
158
|
-
`auto`.
|
|
159
|
-
|
|
160
|
-
```jsx
|
|
161
|
-
// hardcoded value
|
|
162
|
-
<Box backdropFilter="auto" backdropBlur="5px" />
|
|
163
|
-
|
|
164
|
-
// token value
|
|
165
|
-
<Box backdropFilter="auto" backdropBlur="sm" />
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
| Prop | CSS Property | Token Category |
|
|
169
|
-
| -------------- | ----------------- | -------------- |
|
|
170
|
-
| `backdropBlur` | `--backdrop-blur` | `blurs` |
|
|
171
|
-
|
|
172
|
-
## Backdrop Contrast
|
|
173
|
-
|
|
174
|
-
Use the `backdropContrast` prop to apply a contrast effect to the area behind an
|
|
175
|
-
element. The requirement for this prop is to use the `backdropFilter` prop and
|
|
176
|
-
set it to `auto`.
|
|
177
|
-
|
|
178
|
-
```jsx
|
|
179
|
-
<Box backdropFilter="auto" backdropContrast="0.3" />
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
| Prop | CSS Property | Token Category |
|
|
183
|
-
| ------------------ | --------------------- | -------------- |
|
|
184
|
-
| `backdropContrast` | `--backdrop-contrast` | - |
|
|
185
|
-
|
|
186
|
-
## Backdrop Grayscale
|
|
187
|
-
|
|
188
|
-
Use the `backdropGrayscale` prop to apply a grayscale effect to the area behind
|
|
189
|
-
an element. The requirement for this prop is to use the `backdropFilter` prop
|
|
190
|
-
and set it to `auto`.
|
|
191
|
-
|
|
192
|
-
```jsx
|
|
193
|
-
<Box backdropFilter="auto" backdropGrayscale="64%" />
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
| Prop | CSS Property | Token Category |
|
|
197
|
-
| ------------------- | ---------------------- | -------------- |
|
|
198
|
-
| `backdropGrayscale` | `--backdrop-grayscale` | - |
|
|
199
|
-
|
|
200
|
-
## Backdrop Hue Rotate
|
|
201
|
-
|
|
202
|
-
Use the `backdropHueRotate` prop to apply a hue rotate effect to the area behind
|
|
203
|
-
an element. The requirement for this prop is to use the `backdropFilter` prop
|
|
204
|
-
and set it to `auto`.
|
|
205
|
-
|
|
206
|
-
```jsx
|
|
207
|
-
<Box backdropFilter="auto" backdropHueRotate="30deg" />
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
| Prop | CSS Property | Token Category |
|
|
211
|
-
| ------------------- | ----------------------- | -------------- |
|
|
212
|
-
| `backdropHueRotate` | `--backdrop-hue-rotate` | - |
|
|
213
|
-
|
|
214
|
-
## Backdrop Invert
|
|
215
|
-
|
|
216
|
-
Use the `backdropInvert` prop to apply an invert effect to the area behind an
|
|
217
|
-
element. The requirement for this prop is to use the `backdropFilter` prop and
|
|
218
|
-
set it to `auto`.
|
|
219
|
-
|
|
220
|
-
```jsx
|
|
221
|
-
<Box backdropFilter="auto" backdropInvert="40%" />
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
| Prop | CSS Property | Token Category |
|
|
225
|
-
| ---------------- | ------------------- | -------------- |
|
|
226
|
-
| `backdropInvert` | `--backdrop-invert` | - |
|
|
227
|
-
|
|
228
|
-
## Backdrop Opacity
|
|
229
|
-
|
|
230
|
-
Use the `backdropOpacity` prop to apply an opacity effect to the area behind an
|
|
231
|
-
element. The requirement for this prop is to use the `backdropFilter` prop and
|
|
232
|
-
set it to `auto`.
|
|
233
|
-
|
|
234
|
-
```jsx
|
|
235
|
-
<Box backdropFilter="auto" backdropOpacity="0.4" />
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
| Prop | CSS Property | Token Category |
|
|
239
|
-
| ----------------- | -------------------- | -------------- |
|
|
240
|
-
| `backdropOpacity` | `--backdrop-opacity` | - |
|
|
241
|
-
|
|
242
|
-
## Backdrop Saturate
|
|
243
|
-
|
|
244
|
-
Use the `backdropSaturate` prop to apply a saturate effect to the area behind an
|
|
245
|
-
element. The requirement for this prop is to use the `backdropFilter` prop and
|
|
246
|
-
set it to `auto`.
|
|
247
|
-
|
|
248
|
-
```jsx
|
|
249
|
-
<Box backdropFilter="auto" backdropSaturate="0.4" />
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
| Prop | CSS Property | Token Category |
|
|
253
|
-
| ------------------ | --------------------- | -------------- |
|
|
254
|
-
| `backdropSaturate` | `--backdrop-saturate` | - |
|
|
255
|
-
|
|
256
|
-
## Backdrop Sepia
|
|
257
|
-
|
|
258
|
-
Use the `backdropSepia` prop to apply a sepia effect to the area behind an
|
|
259
|
-
element. The requirement for this prop is to use the `backdropFilter` prop and
|
|
260
|
-
set it to `auto`.
|
|
261
|
-
|
|
262
|
-
```jsx
|
|
263
|
-
<Box backdropFilter="auto" backdropSepia="0.4" />
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
| Prop | CSS Property | Token Category |
|
|
267
|
-
| --------------- | ------------------ | -------------- |
|
|
268
|
-
| `backdropSepia` | `--backdrop-sepia` | - |
|
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: Style Props-Flex and Grid
|
|
3
|
-
title: Flex and Grid
|
|
4
|
-
description: JSX style props to control flex and grid layouts
|
|
5
|
-
documentState: InitialDraft
|
|
6
|
-
order: 999
|
|
7
|
-
menu:
|
|
8
|
-
- Style Props
|
|
9
|
-
- Flex and Grid
|
|
10
|
-
tags:
|
|
11
|
-
- document
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Flex and Grid
|
|
15
|
-
|
|
16
|
-
JSX style props to control flex and grid layouts
|
|
17
|
-
|
|
18
|
-
## Flex Basis
|
|
19
|
-
|
|
20
|
-
Use the `flexBasis` prop to set the initial main size of a flex item.
|
|
21
|
-
|
|
22
|
-
```jsx
|
|
23
|
-
<Flex>
|
|
24
|
-
<Box flexBasis="25%" />
|
|
25
|
-
<Box flexBasis="25%" />
|
|
26
|
-
<Box flexBasis="50%" />
|
|
27
|
-
</Flex>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
| Prop | CSS Property | Token Category |
|
|
31
|
-
| ----------- | ------------ | -------------- |
|
|
32
|
-
| `flexBasis` | `flex-basis` | - |
|
|
33
|
-
|
|
34
|
-
## Flex Direction
|
|
35
|
-
|
|
36
|
-
Use the `flexDir` or `flexDirection` prop to set the direction of the main axis
|
|
37
|
-
in a flex container.
|
|
38
|
-
|
|
39
|
-
```jsx
|
|
40
|
-
<Box display="flex" flexDirection="column">
|
|
41
|
-
<Box>Item 1</Box>
|
|
42
|
-
<Box>Item 2</Box>
|
|
43
|
-
<Box>Item 3</Box>
|
|
44
|
-
</Box>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
When using `Flex` component, the `direction` prop is aliased to `flexDirection`.
|
|
48
|
-
|
|
49
|
-
```jsx
|
|
50
|
-
<Flex direction="column">
|
|
51
|
-
<Box>Item 1</Box>
|
|
52
|
-
<Box>Item 2</Box>
|
|
53
|
-
<Box>Item 3</Box>
|
|
54
|
-
</Flex>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
| Prop | CSS Property | Token Category |
|
|
58
|
-
| -------------------------- | ---------------- | -------------- |
|
|
59
|
-
| `flexDir`, `flexDirection` | `flex-direction` | - |
|
|
60
|
-
|
|
61
|
-
## Flex Wrap
|
|
62
|
-
|
|
63
|
-
Use the `flexWrap` prop to set whether flex items are forced onto one line or
|
|
64
|
-
can wrap onto multiple lines.
|
|
65
|
-
|
|
66
|
-
```jsx
|
|
67
|
-
<Box display="flex" flexWrap="wrap">
|
|
68
|
-
<Box>Item 1</Box>
|
|
69
|
-
<Box>Item 2</Box>
|
|
70
|
-
<Box>Item 3</Box>
|
|
71
|
-
</Box>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
When using `Flex` component, the `wrap` prop is aliased to `flexWrap`.
|
|
75
|
-
|
|
76
|
-
```jsx
|
|
77
|
-
<Flex wrap="wrap">
|
|
78
|
-
<Box>Item 1</Box>
|
|
79
|
-
<Box>Item 2</Box>
|
|
80
|
-
<Box>Item 3</Box>
|
|
81
|
-
</Flex>
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
| Prop | CSS Property | Token Category |
|
|
85
|
-
| ---------- | ------------ | -------------- |
|
|
86
|
-
| `flexWrap` | `flex-wrap` | - |
|
|
87
|
-
|
|
88
|
-
## Flex
|
|
89
|
-
|
|
90
|
-
Use the `flex` prop to define the flexibility of a flex container or item.
|
|
91
|
-
|
|
92
|
-
```jsx
|
|
93
|
-
<Flex>
|
|
94
|
-
<Box flex="1" />
|
|
95
|
-
<Box />
|
|
96
|
-
</Flex>
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
| Prop | CSS Property | Token Category |
|
|
100
|
-
| ------ | ------------ | -------------- |
|
|
101
|
-
| `flex` | `flex` | - |
|
|
102
|
-
|
|
103
|
-
## Flex Grow
|
|
104
|
-
|
|
105
|
-
Use the `flexGrow` prop to set the flex grow factor of a flex item.
|
|
106
|
-
|
|
107
|
-
```jsx
|
|
108
|
-
<Flex>
|
|
109
|
-
<Box flexGrow="0" />
|
|
110
|
-
<Box flexGrow="1" />
|
|
111
|
-
</Flex>
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
| Prop | CSS Property | Token Category |
|
|
115
|
-
| ---------- | ------------ | -------------- |
|
|
116
|
-
| `flexGrow` | `flex-grow` | - |
|
|
117
|
-
|
|
118
|
-
## Flex Shrink
|
|
119
|
-
|
|
120
|
-
Use the `flexShrink` prop to set the flex shrink factor of a flex item.
|
|
121
|
-
|
|
122
|
-
```jsx
|
|
123
|
-
<Flex>
|
|
124
|
-
<Box flexShrink="0" />
|
|
125
|
-
<Box flexShrink="1" />
|
|
126
|
-
</Flex>
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
| Prop | CSS Property | Token Category |
|
|
130
|
-
| ------------ | ------------- | -------------- |
|
|
131
|
-
| `flexShrink` | `flex-shrink` | - |
|
|
132
|
-
|
|
133
|
-
## Order
|
|
134
|
-
|
|
135
|
-
Use the `order` prop to set the order of a flex item.
|
|
136
|
-
|
|
137
|
-
```jsx
|
|
138
|
-
<Flex>
|
|
139
|
-
<Box order="0" />
|
|
140
|
-
<Box order="1" />
|
|
141
|
-
</Flex>
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
| Prop | CSS Property | Token Category |
|
|
145
|
-
| ------- | ------------ | -------------- |
|
|
146
|
-
| `order` | `order` | - |
|
|
147
|
-
|
|
148
|
-
## Gap
|
|
149
|
-
|
|
150
|
-
Use the `gap` prop to set the gap between items in a flex or grid container.
|
|
151
|
-
|
|
152
|
-
```jsx
|
|
153
|
-
<Flex>
|
|
154
|
-
<Box>Item 1</Box>
|
|
155
|
-
<Box>Item 2</Box>
|
|
156
|
-
<Box>Item 3</Box>
|
|
157
|
-
</Flex>
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
| Prop | CSS Property | Token Category |
|
|
161
|
-
| ----- | ------------ | -------------- |
|
|
162
|
-
| `gap` | `gap` | `spacing` |
|
|
163
|
-
|
|
164
|
-
## Grid Template Columns
|
|
165
|
-
|
|
166
|
-
Use the `gridTemplateColumns` prop to define the columns of a grid container.
|
|
167
|
-
|
|
168
|
-
```jsx
|
|
169
|
-
<Box display="grid" gridTemplateColumns="repeat(3, minmax(0, 1fr))">
|
|
170
|
-
<Box>Item 1</Box>
|
|
171
|
-
<Box>Item 2</Box>
|
|
172
|
-
<Box>Item 3</Box>
|
|
173
|
-
</Box>
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
When using `Grid` component, the `templateColumns` prop is aliased to
|
|
177
|
-
`gridTemplateColumns`.
|
|
178
|
-
|
|
179
|
-
```jsx
|
|
180
|
-
<Grid templateColumns="repeat(3, minmax(0, 1fr))">
|
|
181
|
-
<Box>Item 1</Box>
|
|
182
|
-
<Box>Item 2</Box>
|
|
183
|
-
<Box>Item 3</Box>
|
|
184
|
-
</Grid>
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Grid Template Start/End
|
|
188
|
-
|
|
189
|
-
Use the `gridTemplateStart` and `gridTemplateEnd` props to define the start and
|
|
190
|
-
end of a grid container.
|
|
191
|
-
|
|
192
|
-
```jsx
|
|
193
|
-
<Box display="grid" gridTemplateColumns="repeat(3, minmax(0, 1fr))">
|
|
194
|
-
<Box>Item 1</Box>
|
|
195
|
-
<Box gridColumn="span 2 / span 2">Item 2</Box>
|
|
196
|
-
<Box>Item 3</Box>
|
|
197
|
-
</Box>
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
| Prop | CSS Property | Token Category |
|
|
201
|
-
| ------------------- | --------------------- | -------------- |
|
|
202
|
-
| `gridTemplateStart` | `grid-template-start` | - |
|
|
203
|
-
| `gridTemplateEnd` | `grid-template-end` | - |
|
|
204
|
-
|
|
205
|
-
## Grid Template Rows
|
|
206
|
-
|
|
207
|
-
Use the `gridTemplateRows` prop to define the rows of a grid container.
|
|
208
|
-
|
|
209
|
-
```jsx
|
|
210
|
-
<Box display="grid" gridTemplateRows="repeat(3, minmax(0, 1fr))">
|
|
211
|
-
<Box>Item 1</Box>
|
|
212
|
-
<Box>Item 2</Box>
|
|
213
|
-
<Box>Item 3</Box>
|
|
214
|
-
</Box>
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
| Prop | CSS Property | Token Category |
|
|
218
|
-
| ------------------ | -------------------- | -------------- |
|
|
219
|
-
| `gridTemplateRows` | `grid-template-rows` | - |
|
|
220
|
-
|
|
221
|
-
## Grid Row Start/End
|
|
222
|
-
|
|
223
|
-
Use the `gridRowStart` and `gridRowEnd` props to define the start and end of a
|
|
224
|
-
grid item.
|
|
225
|
-
|
|
226
|
-
```jsx
|
|
227
|
-
<Box display="grid" gridTemplateRows="repeat(3, minmax(0, 1fr))">
|
|
228
|
-
<Box gridRowStart="1" gridRowEnd="3">
|
|
229
|
-
Item 1
|
|
230
|
-
</Box>
|
|
231
|
-
<Box>Item 2</Box>
|
|
232
|
-
<Box>Item 3</Box>
|
|
233
|
-
</Box>
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
| Prop | CSS Property | Token Category |
|
|
237
|
-
| -------------- | ---------------- | -------------- |
|
|
238
|
-
| `gridRowStart` | `grid-row-start` | - |
|
|
239
|
-
| `gridRowEnd` | `grid-row-end` | - |
|
|
240
|
-
|
|
241
|
-
## Grid Autoflow
|
|
242
|
-
|
|
243
|
-
Use the `gridAutoFlow` prop to define how auto-placed items get flowed into the
|
|
244
|
-
grid.
|
|
245
|
-
|
|
246
|
-
```jsx
|
|
247
|
-
<Box display="grid" gridAutoFlow="row">
|
|
248
|
-
<Box>Item 1</Box>
|
|
249
|
-
<Box>Item 2</Box>
|
|
250
|
-
<Box>Item 3</Box>
|
|
251
|
-
</Box>
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
| Prop | CSS Property | Token Category |
|
|
255
|
-
| -------------- | ---------------- | -------------- |
|
|
256
|
-
| `gridAutoFlow` | `grid-auto-flow` | - |
|
|
257
|
-
|
|
258
|
-
## Grid Auto Columns
|
|
259
|
-
|
|
260
|
-
Use the `gridAutoColumns` prop to specify the size of the grid columns that were
|
|
261
|
-
created without an explicit size.
|
|
262
|
-
|
|
263
|
-
```jsx
|
|
264
|
-
<Box display="grid" gridAutoColumns="120px">
|
|
265
|
-
<Box>Item 1</Box>
|
|
266
|
-
<Box>Item 2</Box>
|
|
267
|
-
<Box>Item 3</Box>
|
|
268
|
-
</Box>
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
| Prop | CSS Property | Token Category |
|
|
272
|
-
| ----------------- | ------------------- | -------------- |
|
|
273
|
-
| `gridAutoColumns` | `grid-auto-columns` | - |
|
|
274
|
-
|
|
275
|
-
## Grid Auto Rows
|
|
276
|
-
|
|
277
|
-
Use the `gridAutoRows` prop to specify the size of the grid rows that were
|
|
278
|
-
created without an explicit size.
|
|
279
|
-
|
|
280
|
-
```jsx
|
|
281
|
-
<Box display="grid" gridTemplateRows="200px" gridAutoRows="120px">
|
|
282
|
-
<Box>Item 1</Box>
|
|
283
|
-
<Box>Item 2</Box>
|
|
284
|
-
<Box>Item 3</Box>
|
|
285
|
-
</Box>
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
| Prop | CSS Property | Token Category |
|
|
289
|
-
| -------------- | ---------------- | -------------- |
|
|
290
|
-
| `gridAutoRows` | `grid-auto-rows` | - |
|
|
291
|
-
|
|
292
|
-
## Justify Content
|
|
293
|
-
|
|
294
|
-
Use the `justifyContent` prop to align items along the main axis of a flex
|
|
295
|
-
container.
|
|
296
|
-
|
|
297
|
-
```jsx
|
|
298
|
-
<Box display="flex" justifyContent="center">
|
|
299
|
-
<Box>Item 1</Box>
|
|
300
|
-
<Box>Item 2</Box>
|
|
301
|
-
<Box>Item 3</Box>
|
|
302
|
-
</Box>
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
When using the `Flex` component, the `justify` prop is aliased to
|
|
306
|
-
`justifyContent`.
|
|
307
|
-
|
|
308
|
-
```jsx
|
|
309
|
-
<Flex justify="center">
|
|
310
|
-
<Box>Item 1</Box>
|
|
311
|
-
<Box>Item 2</Box>
|
|
312
|
-
<Box>Item 3</Box>
|
|
313
|
-
</Flex>
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
| Prop | CSS Property | Token Category |
|
|
317
|
-
| ---------------- | ----------------- | -------------- |
|
|
318
|
-
| `justifyContent` | `justify-content` | - |
|
|
319
|
-
|
|
320
|
-
## Justify Items
|
|
321
|
-
|
|
322
|
-
Use the `justifyItems` prop to control the alignment of grid items within their
|
|
323
|
-
scope.
|
|
324
|
-
|
|
325
|
-
```jsx
|
|
326
|
-
<Box display="grid" justifyItems="center">
|
|
327
|
-
<Box>Item 1</Box>
|
|
328
|
-
<Box>Item 2</Box>
|
|
329
|
-
<Box>Item 3</Box>
|
|
330
|
-
</Box>
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
| Prop | CSS Property | Token Category |
|
|
334
|
-
| -------------- | --------------- | -------------- |
|
|
335
|
-
| `justifyItems` | `justify-items` | - |
|
|
336
|
-
|
|
337
|
-
## Align Content
|
|
338
|
-
|
|
339
|
-
Use the `alignContent` prop to align rows of content along the cross axis of a
|
|
340
|
-
flex container when there's extra space.
|
|
341
|
-
|
|
342
|
-
```jsx
|
|
343
|
-
<Box display="flex" alignContent="center">
|
|
344
|
-
<Box>Item 1</Box>
|
|
345
|
-
<Box>Item 2</Box>
|
|
346
|
-
<Box>Item 3</Box>
|
|
347
|
-
</Box>
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
When using the `Flex` component, the `align` prop is aliased to `alignContent`.
|
|
351
|
-
|
|
352
|
-
```jsx
|
|
353
|
-
<Flex align="center">
|
|
354
|
-
<Box>Item 1</Box>
|
|
355
|
-
<Box>Item 2</Box>
|
|
356
|
-
<Box>Item 3</Box>
|
|
357
|
-
</Flex>
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
| Prop | CSS Property | Token Category |
|
|
361
|
-
| -------------- | --------------- | -------------- |
|
|
362
|
-
| `alignContent` | `align-content` | - |
|
|
363
|
-
|
|
364
|
-
## Align Items
|
|
365
|
-
|
|
366
|
-
Use the `alignItems` prop to control the alignment of grid items within their
|
|
367
|
-
scope.
|
|
368
|
-
|
|
369
|
-
```jsx
|
|
370
|
-
<Box display="grid" alignItems="center">
|
|
371
|
-
<Box>Item 1</Box>
|
|
372
|
-
<Box>Item 2</Box>
|
|
373
|
-
<Box>Item 3</Box>
|
|
374
|
-
</Box>
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
## Align Self
|
|
378
|
-
|
|
379
|
-
Use the `alignSelf` prop to control the alignment of a grid item within its
|
|
380
|
-
scope.
|
|
381
|
-
|
|
382
|
-
```jsx
|
|
383
|
-
<Box display="grid">
|
|
384
|
-
<Box alignSelf="center">Item 1</Box>
|
|
385
|
-
<Box>Item 2</Box>
|
|
386
|
-
<Box>Item 3</Box>
|
|
387
|
-
</Box>
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
| Prop | CSS Property | Token Category |
|
|
391
|
-
| ----------- | ------------ | -------------- |
|
|
392
|
-
| `alignSelf` | `align-self` | - |
|
|
393
|
-
|
|
394
|
-
## Place Content
|
|
395
|
-
|
|
396
|
-
Use the `placeContent` prop to align content along both the block and inline
|
|
397
|
-
directions at once. It works like `justifyContent` and `alignContent` combined,
|
|
398
|
-
and can be used in flex and grid containers.
|
|
399
|
-
|
|
400
|
-
```jsx
|
|
401
|
-
<Flex placeContent="center">
|
|
402
|
-
<Box>Item 1</Box>
|
|
403
|
-
<Box>Item 2</Box>
|
|
404
|
-
<Box>Item 3</Box>
|
|
405
|
-
</Flex>
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
| Prop | CSS Property | Token Category |
|
|
409
|
-
| -------------- | --------------- | -------------- |
|
|
410
|
-
| `placeContent` | `place-content` | - |
|
|
411
|
-
|
|
412
|
-
## Place Items
|
|
413
|
-
|
|
414
|
-
Use the `placeItems` prop to align items along both the block and inline
|
|
415
|
-
directions at once. It works like `justifyItems` and `alignItems` combined, and
|
|
416
|
-
can be used in flex and grid containers.
|
|
417
|
-
|
|
418
|
-
```jsx
|
|
419
|
-
<Box display="grid" placeItems="center">
|
|
420
|
-
<Box>Item 1</Box>
|
|
421
|
-
<Box>Item 2</Box>
|
|
422
|
-
<Box>Item 3</Box>
|
|
423
|
-
</Box>
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
| Prop | CSS Property | Token Category |
|
|
427
|
-
| ------------ | ------------- | -------------- |
|
|
428
|
-
| `placeItems` | `place-items` | - |
|
|
429
|
-
|
|
430
|
-
## Place Self
|
|
431
|
-
|
|
432
|
-
Use the `placeSelf` prop to align a grid item along both the block and inline
|
|
433
|
-
directions at once.
|
|
434
|
-
|
|
435
|
-
```jsx
|
|
436
|
-
<Box display="grid">
|
|
437
|
-
<Box placeSelf="center">Item 1</Box>
|
|
438
|
-
<Box>Item 2</Box>
|
|
439
|
-
<Box>Item 3</Box>
|
|
440
|
-
</Box>
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
| Prop | CSS Property | Token Category |
|
|
444
|
-
| ----------- | ------------ | -------------- |
|
|
445
|
-
| `placeSelf` | `place-self` | - |
|