AspectRatio API
import { AspectRatio } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
elevation | 'none' | 'low' | 'high' | |
fit | 'cover' | 'contain' | 'fill' | 'none' | 'scale-down' | |
headless | boolean | |
interactive | boolean | |
radius | number | string | |
ratio | number | string | |
showRatioBadge | boolean | |
size | 'sm' | 'md' | 'lg' | '1' | '2' | '3' | |
tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | |
variant | 'surface' | 'soft' | 'outline' | 'solid' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-aspect-ratio>
AspectRatio renders the ui-aspect-ratio custom element from @editora/ui-core, which can also be used without React.
Attributes: elevation, fit, headless, interactive, radius, ratio, show-ratio-badge, size, tone, variant
Events: change, resize