Esc
Documentation
On this page

Props

PropTypeDefaultDescription
content requiredPageNode | readonly PageNode[]NoneChild nodes
directionFlexDirection"row"Flex direction
gapLayoutGap"md"Spacing between items
alignFlexAlign"stretch"Cross-axis alignment
justifyFlexJustify"start"Main-axis alignment
wrapbooleanfalseAllow 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";

View the source on GitHub