Aspect Ratio
Control width-to-height proportions of elements.
Import​
src/screens/Component.js
import { aspect } from "nativeflowcss";
Properties​
| Object | Native properties |
|---|---|
| aspect.auto | { aspectRatio: 'auto' } |
| aspect.square | { aspectRatio: 1 } |
| aspect.video | { aspectRatio: 16 / 9 } |
Custom Aspect Ratios​
Custom properties are usually rendered using _(customValue)
| Object | Native Properties |
|---|---|
| aspect.custom_(customValue) | { aspectRatio: customValue } |