bits

Aspect Ratio

Displays content with a specified aspect ratio, ensuring consistent and visually balanced presentation.

Gray by Drew Beamer

Structure

	<script lang="ts">
  import { AspectRatio } from "bits-ui";
</script>
 
<AspectRatio.Root />
	<script lang="ts">
  import { AspectRatio } from "bits-ui";
</script>
 
<AspectRatio.Root />

Component API

AspectRatio.Root

The aspect ratio component.

Property Type Description
ratio number

The desired aspect ratio.

Default: 1

🚧 UNDER CONSTRUCTION 🚧