# AspectRatio A box that keeps its shape whatever is inside it. - Group: Surfaces - Import: `import { AspectRatio } from '@misoto22/design'` - Page: https://ui.misoto22.com/components/aspect-ratio/ - Related: skeleton, card ## When to reach for it The height has to be known before the content loads — a media grid that would otherwise reflow every time an image arrives. ## Anatomy - **Box** (required) — A relative, full-width
carrying aspect-ratio as an inline style. A style and not a class because Tailwind can only generate what it reads verbatim in the source, and this value arrives at runtime. - **Children** (required) — Every DIRECT child, taken out of flow and stretched to fill the box. That is what guarantees the ratio holds: nothing inside can contribute a height, so content with no intrinsic size of its own still gets the whole box. - **Crop** — object-cover on a direct or