Skip to content

Aspect-Ratio Primitive

Types Primitives

Slot Primitives


Presents content within a chosen aspect ratio.

Installation

Copy/paste the following code to ~/components/primitives/aspect-ratio.tsx

Usage

import * as AspectRatio from '~/components/primitives/aspect-ratio';
function Example() {
return (
<AspectRatio.Root ratio={16 / 9} />
);
}

Props

Root

Extends View props

PropTypeNote
rationumberDefaults to 1 (optional)