import classnames from "classnames"; import React from "react"; import { Button } from "../src/Button/Button"; import { FlexBox, FlexItem, ItemAlign, Justify } from "../src/flex"; import "./FlexExample.less"; import "../src/less/spacing.less"; export default function FlexExample() { const { cssClass } = FlexExample; return (
A FlexBox may contain regular HTML elements.
FlexItem children with grow={"{true}"} will fill any available space.
FlexBoxes can be nested as any other elements. FlexItem properties, such as{" "}
grow can also be applied for FlexItem behavior.
World record: 9.58s
Record holder: Usain Bolt
Last updated: Aug 16, 2009
World record: 19.19s
Record holder: Usain Bolt
Last updated: Aug 20, 2009
Setting wrap={"{true}"} causes FlexBox children to wrap to the next line when
there isn't enough space on one line.
FlexBox and FlexItem are divs by default but can be rendered as any element or component.
Here, the FlexBox is rendered as a {" and the FlexItems as{" "}
"}
{"s.
Setting column={"{true}"} causes FlexBox children to be arranged vertically.
FlexItem properties such as grow now act along the vertical axis.