Skip to content
Data Display

AspectRatio

Constrains its child to a fixed width-to-height ratio. For images, video, and embeds that would otherwise resize the page as they load.

16:9 Widescreen

16:9

Import

import { AspectRatio } from "@mikenotthepope/substrateui"

1:1 Square

1:1

API Reference

PropTypeDefaultDescription
rationumber1The width-to-height ratio. For example, 16/9 for widescreen or 1 for a square.