Skip to main content

Variable: AspectRatio

@arolariu/components


@arolariu/components / AspectRatio

Variable: AspectRatio

const AspectRatio: ForwardRefExoticComponent<AspectRatioProps & RefAttributes<HTMLDivElement>>

Defined in: components/ui/aspect-ratio.tsx:29

Preserves a predictable width-to-height ratio for arbitrary content.

Remarks

  • Pure CSS component (no Base UI primitive)
  • Renders a <div> element
  • Styling via CSS Modules with --ac-* custom properties

Example

<AspectRatio ratio={16 / 9}>Media</AspectRatio>

See

AspectRatioProps for available props

// was this page useful?