Width, height, and constraints
Supported width, height, and constraints utilities.
Quick reference
| Syntax | Behavior |
|---|---|
w-N / h-N | Explicit dimensions in the four-unit spacing scale. |
min-w-N / min-h-N / max-w-N / max-h-N | Constraints. |
w-full / h-full | 100% of a finite containing allocation. |
w-auto / h-auto | Intrinsic sizing. |
w-1/2 / w-1/3 / w-2/3 / w-1/4 / w-3/4 | Supported fractions; h/min/max/basis share the grammar. |
max-w-none / max-h-none | Clear maximum constraint. |
fill | Fill available bounded space. |
aspect-square / aspect-video | 1:1 / 16:9 aspect ratio. |
Example
<View class="w-24 h-12 min-w-0 max-w-full bg-accent" />
Rules and validation
Numeric suffixes are 0–999 with optional .5, multiplied by four logical units. Percentage/flex sizing cannot create finite bounds on an unbounded scroll axis. Minimum/maximum constraints apply immediately during motion.