AsterUIDocsv1.0.2

Docs / Component reference

AspectRatio

Reserve a rectangle for media while the page is laid out. Its width can change while the ratio stays fixed.

Aspect ratio example

Install

sh
npx @fierst/ui@1.0.2 add aspect-ratio

Registry dependencies: theme.

Exports from ./ui/aspect-ratio: AspectRatio.

Download the registry source for aspect-ratio 1.0.2.

API contracts

ts
export function AspectRatio({
  ratio = 16 / 9,
  class: extraClass,
  children,
}: {
  ratio?: number | string;
  class?: string;
  children?: View;
})