structure — wyrd.component.aspect-ratio

AspectRatio

Content primitive that reserves a fixed media ratio around slotted content.

Install @wyrd-company/react or the Flutter package and use it directly — your DESIGN.md does the styling.

01

Examples

Generated from the contract's examples block. Previews are the published @wyrd-company/react component, themed by the brand's role tokens — flip the site's light/dark toggle and they follow.

Code target Applies to every example on component pages.
video-thumbnail state: default
Illustrated designer working at a dark workbench
Usage
import portraitUrl from "../example-assets/workbench-portrait.png";
import { WyrdAspectRatio } from "@wyrd-company/react";

export function MediaExample() {
  return (
    <WyrdAspectRatio ratio="16-9">
      <img src={portraitUrl} alt="Illustrated designer working at a dark workbench" />
    </WyrdAspectRatio>
  );
}
square-artwork state: default
Release 0.12Catalog artwork
Usage
import { WyrdAspectRatio } from "@wyrd-company/react";

<WyrdAspectRatio ratio="1-1">
  Release 0.12 | Catalog artwork
</WyrdAspectRatio>
panoramic-banner state: default
The Wyrding WayAuthor the component once. Let the platforms agree.
Usage
import { WyrdAspectRatio } from "@wyrd-company/react";

<WyrdAspectRatio ratio="21-9">
  The Wyrding Way | Author the component once. Let the platforms agree.
</WyrdAspectRatio>
02

Properties

NameTypeDefaultSummary
ratio 1-1 | 4-3 | 3-2 | 16-9 | 21-9 16-9 Fixed ratio enum; maps normatively to 1/1, 4/3, 3/2, 16/9, or 21/9.
03

Slots & events

SlotCardinalityAcceptsSummary
content one-or-many content, component Content constrained by the selected aspect ratio.
04

States

StateSourceSummary
default platform Content is constrained to the selected ratio.
05

Accessibility

From the contract's accessibility obligations. Role none

  • Adds no accessibility semantics of its own.
  • Preserves the semantics and document order of slotted content.
  • Verified under: rtl, density-compact, text-expansion.
06

SDUI

Status: serializable. Aspect Ratio serializes a deliberate fixed ratio enum; arbitrary numeric ratios can be added later without changing current values.

SerializableMembers
Propertiesratio
Slotscontent
Events
The Wyrding Way — a contract-first design system. © Wyrd Company