Expo UI and Router for iOSExpo SDK 57 and later, iOS only
Modifiers

aspectRatio

Sets aspect ratio constraint.

aspectRatio(params)

ParameterTypeDescription
params{ contentMode: 'fill' | 'fit', ratio: number }Optional width/height aspect ratio and content mode.

Sets aspect ratio constraint.

Returns: ModifierConfig

See: Official SwiftUI documentation.

Works with

You can add aspectRatio to any view. It changes what you see on 39 of the 39 components.

Sources

The original Expo docs for this page:

On this page