Skip to content

Aspect-Ratio

Aspect-Ratio Primitive

Demo


Presents content within a chosen aspect ratio.

Installation

Terminal window
npx @react-native-reusables/cli@latest add aspect-ratio

Usage

import { AspectRatio } from '~/components/ui/aspect-ratio';
function Example() {
return (
<AspectRatio ratio={16 / 9} />
);
}

Props

AspectRatio

Extends View props

PropTypeNote
rationumberDefaults to 1 (optional)