Grid
A grid uses the CSS grid API to create consistent layouts.Installation
| Install | yarn add @atlaskit/primitives |
|---|---|
| Source | Bitbucket.org, (opens new window) |
| npm | @atlaskit/primitives, (opens new window) |
| Bundle | unpkg.com, (opens new window) |
Props
| Description | Used to align the grid along the block axis. |
|---|---|
| Type | "center" | "end" | "start" | "space-around" | "space-between" | "space-evenly" | "stretch" |
| Description | Used to align children along the block axis. |
|---|---|
| Type | "center" | "baseline" | "end" | "start" | "stretch" |
| Description | The DOM element to render as the Flex. Defaults to |
|---|---|
| Type | "div" | "ol" | "span" | "ul" |
| Description | Specifies how auto-placed items get flowed into the grid. CSS |
|---|---|
| Type | "row" | "column" | "dense" | "row dense" | "column dense" |
| Description | Elements to be rendered inside the grid. Required as a grid without children should not be a grid. |
|---|---|
| Type | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal |
| Description | Represents the space between each column. |
|---|---|
| Type | "space.025" | "space.050" | "space.100" | "space.150" | "space.200" | "space.0" | "space.075" | "space.250" | "space.300" | "space.400" | "space.500" | "space.600" | "space.800" | "space.1000" |
| Description |
|
|---|---|
| Type | never |
| Description | Represents the space between each child across both axes. |
|---|---|
| Type | "space.025" | "space.050" | "space.100" | "space.150" | "space.200" | "space.0" | "space.075" | "space.250" | "space.300" | "space.400" | "space.500" | "space.600" | "space.800" | "space.1000" |
| Description | HTML id attrubute. |
|---|---|
| Type | string |
| Description | Used to align children along the inline axis. |
|---|---|
| Type | "center" | "end" | "start" | "space-around" | "space-between" | "space-evenly" | "stretch" |
| Description | Used to align the grid along the inline axis. This prop is not hooked up and doesn't nothing! |
|---|---|
| Type | "center" | "end" | "start" | "stretch" |
| Description | No description. |
|---|---|
| Type | ((instance: any) => void) | RefObject<any> |
| Description | Accessible role. |
|---|---|
| Type | string |
| Description | Represents the space between each row. |
|---|---|
| Type | "space.025" | "space.050" | "space.100" | "space.150" | "space.200" | "space.0" | "space.075" | "space.250" | "space.300" | "space.400" | "space.500" | "space.600" | "space.800" | "space.1000" |
| Description | A unique string that appears as data attribute |
|---|---|
| Type | string |
| Description | Apply a subset of permitted styles powered by Atlassian Design System design tokens. |
|---|---|
| Type | false | (XCSSValue<"appearance" | "borderColor" | "grid" | "clipPath" | "filter" | "marker" | "mask" | "translate" | "content" | "color" | "top" | "bottom" | "right" | "left" | "height" | ... 486 more ... | "glyphOrientationVertical", DesignTokenStyles, ""> & ... 4 more ... & { ...; }) |