Skip to main content

Object Fit

Define how content/images fits within containers.

Import​

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

Properties​

ObjectNative properties
object_fit.cover{ resizeMode: 'cover' }
object_fit.contain{ resizeMode: 'contain' }
object_fit.stretch{ resizeMode: 'stretch' }
object_fit.repeat{ resizeMode: 'repeat' }
object_fit.center{ resizeMode: 'center' }
object_fit.fill{ objectFit: 'fill' }
object_fit.scale_down{ objectFit: 'scale_down' }