Skip to main content

Aspect Ratio

Control width-to-height proportions of elements.

Import​

src/screens/Component.js
import { aspect } from "nativeflowcss";

Properties​

ObjectNative properties
aspect.auto{ aspectRatio: 'auto' }
aspect.square{ aspectRatio: 1 }
aspect.video{ aspectRatio: 16 / 9 }

Custom Aspect Ratios​

Custom properties are usually rendered using _(customValue)

ObjectNative Properties
aspect.custom_(customValue){ aspectRatio: customValue }