Aspect Ratio
Displays content within a desired ratio.
Features
- Accepts any custom ratio.
Installation
Install the component from your command line.
bash
npm install radix-vue
Anatomy
Import the component.
vue
<script setup>
import { AspectRatio } from 'radix-vue'
</script>
<template>
<AspectRatio />
</template>
API Reference
Root
Contains the content you want to constrain to a given ratio.
Prop | Type | Default |
---|---|---|
as | string | Component | div |
asChild | boolean | false |
ratio | number | 1 |