Knit UI
GitHub

Playground

Loading playground…

Playground
<Flex
  direction="row"
  align="flex-start"
  justify="flex-start"
  wrap="nowrap"
  gap="$md"
/>

Examples

Directions

All four direction values — row, row-reverse, column, column-reverse.

Loading example…

DirectionsSourceStorybook

Alignment

The align prop controls cross-axis alignment; shown in a fixed-height container.

Loading example…

AlignmentSourceStorybook

Justification

The justify prop distributes items along the main axis.

Loading example…

JustificationSourceStorybook

Wrapping

wrap="wrap" allows items to flow onto multiple lines when space is tight.

Loading example…

WrappingSourceStorybook

Gap Tokens

gap, rowGap, and columnGap use Tamagui spacing tokens.

Loading example…

Gap TokensSourceStorybook

Composed Layout

Flex composes naturally with Box children of varying sizes for real-world layouts.

Loading example…

Composed LayoutSourceStorybook

Props

PropTypeDefaultDescription
directionFlexDirection | undefined
row · row-reverse · column · column-reverse
rowMain-axis direction (maps to `flexDirection`).
disabled systemboolean | undefined
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
theme systemThemeName | null | undefinedApplies a theme to this element
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 500 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.