Flex and alignment
Supported flex and alignment utilities.
Quick reference
| Syntax | Behavior |
|---|---|
flex-row / flex-col | Horizontal/vertical flow; reverse forms supported. |
flex-wrap / flex-nowrap / flex-wrap-reverse | Wrap policy. |
flex-1 / flex-auto / flex-initial / flex-none | Flex allocation. |
grow / grow-0 / shrink / shrink-0 | Growth and shrinking. |
basis-N / basis-1/2 | Initial allocation. |
items-start / center / end / stretch | Cross-axis alignment, with the items- prefix. |
justify-start / center / end / between / around / evenly | Main-axis alignment, with the justify- prefix. |
self-auto / start / center / end / stretch | Child alignment, with the self- prefix. |
content-start / center / end / between / around / evenly / stretch | Wrapped-line alignment, with the content- prefix. |
Example
<Row class="gap-2 items-center"><Text text="Label" /><View class="flex-1 h-8 bg-accent" /></Row>
Rules and validation
Row and Column establish flow; container alignment/gaps require supported containers. Flex growth needs finite parent constraints. Control-state variants cannot change layout.