Flex
A flex implements the CSS flexbox API.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 children along the cross axis. |
|---|---|
| Type | "center" | "start" | "end" | "baseline" | "stretch" |
| Description | The DOM element to render as the Flex. Defaults to |
|---|---|
| Type | "div" | "dl" | "li" | "ol" | "span" | "ul" |
| Description | Elements to be rendered inside the Flex. |
|---|---|
| Type | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal |
| Description | Represents the space between each child. |
|---|---|
| Type | "space.0" | "space.025" | "space.050" | "space.075" | "space.100" | "space.150" | "space.200" | "space.250" | "space.300" | "space.400" | "space.500" | "space.600" | "space.800" | "space.1000" |
| Description |
|
|---|---|
| Type | never |
| Description | Represents the flex direction property of CSS flexbox. |
|---|---|
| Type | "row" | "column" |
| Description | Represents the space between each child. |
|---|---|
| Type | "space.0" | "space.025" | "space.050" | "space.075" | "space.100" | "space.150" | "space.200" | "space.250" | "space.300" | "space.400" | "space.500" | "space.600" | "space.800" | "space.1000" |
| Description | Used to align children along the main axis. |
|---|---|
| Type | "center" | "start" | "end" | "space-around" | "space-between" | "space-evenly" | "stretch" |
| Description | No description. |
|---|---|
| Type | ((instance: any) => void) | RefObject<any> |
| Description | Accessible role. |
|---|---|
| Type | string |
| Description | Represents the space between each child. |
|---|---|
| Type | "space.0" | "space.025" | "space.050" | "space.075" | "space.100" | "space.150" | "space.200" | "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 | Represents the flex wrap property of CSS flexbox. |
|---|---|
| Type | "wrap" | "nowrap" |
| Description | Apply a subset of permitted styles powered by Atlassian Design System design tokens. |
|---|---|
| Type | false | (XCSSValue<"appearance" | "color" | "maxWidth" | "grid" | "borderColor" | "clipPath" | "filter" | "marker" | "mask" | "height" | "width" | "translate" | "content" | "border" | ... 487 more ... | "viewTimeline", DesignTokenStyles, ""> & ... 4 more ... & { ...; }) |