Flex
Flexbox row or column layout.
On this page
Props
| Prop | Type | Default | Description |
|---|---|---|---|
content required | PageNode | readonly PageNode[] | None | Child nodes |
direction | FlexDirection | "row" | Flex direction |
gap | LayoutGap | "md" | Spacing between items |
align | FlexAlign | "stretch" | Cross-axis alignment |
justify | FlexJustify | "start" | Main-axis alignment |
wrap | boolean | false | Allow wrapping |
Example
ts
Flex({
direction: "row",
gap: "sm",
align: "center",
justify: "between",
content: [
Badge({ label: "Status" }),
Button({ label: "Action" }),
],
})Supporting types
FlexDirection
export type FlexDirection = "row" | "column";FlexAlign
export type FlexAlign = "start" | "center" | "end" | "stretch";FlexJustify
export type FlexJustify = "start" | "center" | "end" | "between";