📄 radixui/themes/docs/components/aspect-ratio

File: aspect-ratio.md | Updated: 11/15/2025

Source: https://www.radix-ui.com/themes/docs/components/aspect-ratio

Radix Homepage

Made by WorkOS

Radix Homepage

Made by WorkOS

ThemesThemes PrimitivesPrimitives IconsIcons ColorsColors

Documentation Playground Blog

Overview

Getting started Styling Layout Releases Resources

Theme

Overview Color Dark mode Typography Spacing Breakpoints Radius Shadows Cursors

Layout

Box Flex Grid Container Section

Typography

Text Heading Blockquote Code Em Kbd Link Quote Strong

Components

Alert Dialog Aspect Ratio Avatar Badge Button Callout Card Checkbox Checkbox Group Checkbox Cards Context Menu Data List Dialog Dropdown Menu Hover Card Icon Button Inset Popover Progress Radio Radio Group Radio Cards Scroll Area Segmented Control Select Separator Skeleton Slider Spinner Switch Table Tabs Tab Nav Text Area Text Field Tooltip

Utilities

Accessible Icon Portal Reset Slot Theme Visually Hidden

Components

Aspect Ratio

Displays content within a desired ratio.

View source Report an issue View in Playground

A house in a forest

<AspectRatio ratio={16 / 8}>
	<img
		src="https://images.unsplash.com/photo-1479030160180-b1860951d696?&auto=format&fit=crop&w=1200&q=80"
		alt="A house in a forest"
		style={{
			objectFit: "cover",
			width: "100%",
			height: "100%",
			borderRadius: "var(--radius-2)",
		}}
	/>
</AspectRatio>

API Reference


This component inherits props from the Aspect Ratio primitive .

PreviousAlert Dialog

NextAvatar

Edit this page on GitHub.