Skip to content

Aspect-Ratio Primitive

Presents content within a chosen aspect ratio.

Installation

Install the component via your command line.

Terminal window
npx expo install @rn-primitives/aspect-ratio

Usage

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

Props

Root

Extends View props

PropTypeNote
rationumberDefaults to 1 (optional)