Aspect Ratio
Locks a box’s width-to-height proportions using the padding-bottom technique, so it degrades correctly even without native aspect-ratio support.
API
All inputs and configuration options for zyra-aspect-ratio.
| Prop | Type | Default | Description |
|---|---|---|---|
ratio | AspectRatioValue | '16/9' | Number or "w/h" / "w:h" string |
objectFit | 'cover' | 'contain' | 'fill' | 'none' | 'scale-down' | 'cover' | Applied to a directly-projected img/video |
overflowHidden | boolean | true | Clips content to the ratio box |
Accessibility
Built to meet WCAG 2.0 AA. These notes cover the key ARIA, keyboard, and interaction behaviours.
- Projected images still need their own meaningful `alt` text