Overview
Use aspect ratio utilities when the shape of the frame matters more than the media inside it. The framework shipsaspect-square, aspect-video, and aspect-auto (reset), with responsive --on-* variants where structural utilities support them.
| Class | Ratio | CSS | Usage |
|---|---|---|---|
.aspect-square | 1:1 | aspect-ratio: 1 / 1; | Square frames |
.aspect-video | 16:9 | aspect-ratio: 16 / 9; | Video and hero media |
.aspect-auto | — | aspect-ratio: auto; | Remove a fixed ratio; use intrinsic or content-driven sizing |
Example
Best Practices
Pair With Object Fit
Use
.object-cover or .object-contain to decide how media behaves inside the frame.Use Square for Repeating Media
Avatars, product tiles, and thumbnail systems often benefit from
aspect-square.Related Utilities
Object Fit
Control how images fit in containers
Overflow
Control clipping and scrolling

