AspectRatio | NativeBase | Universal Components for React and React Native

Search
K
Hire us
Data Display
Typography
Disclosure
Media and Icons
Others
Please opt in to our enterprise plan (coming soon) for priority support with NativeBase. If you are starting a new project, we recommend using gluestack-ui. For your existing projects, you can utilize @gluestack-ui/themed-native-base (beta).
AspectRatio
AspectRatio controls the size of the undefined dimension of a node or child component. You can refer for more details.
Import
Copy
import { AspectRatio } from "native-base";
Example
Playground
Props
ratio
The aspect ratio of the container. Some examples are `16/9`, `16/10`, `9/16`, `4/3`
Type: ResponsiveValue<number>
Default: 4/3
Nativebase logo
MadeWithNativeBase