---
name: layout-min-max-sizing
description: Setting minimum and maximum width and height with min-w, max-w, min-h, max-h
---
# Min & Max Sizing
Utilities for constraining element dimensions with minimum and maximum width/height.
## Usage
### Min width
```html
min-w-24
min-w-64
min-w-full
min-w-3/4
min-w-sm
min-w-xl
min-content
max-content
fit-content
auto
Custom
```
### Max width
Use `max-w-` with similar scales: spacing numbers, fractions (`max-w-1/2`), container sizes (`max-w-md`), `max-w-full`, `max-w-screen`, `max-w-min`, `max-w-max`, `max-w-fit`, `max-w-none`.
### Min / Max height
```html
At least full viewport height
Allow shrinking in flex
Scrollable with max height
```
## Key Points
- min-w: spacing scale, fractions, container scale (3xs–7xl), `full`, `screen`, `min`, `max`, `fit`, `auto`
- max-w: same options plus `none`
- min-h / max-h: similar scales; `min-h-0` important for flex children to shrink
- Viewport units: `min-w-screen`, `min-w-dvw`, `min-w-svw`, `min-w-lvw`
- Container scale: `min-w-3xs` through `min-w-7xl` map to `--container-*` variables