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

frame

Sets the frame properties of a view.

frame(params)

ParameterTypeDescription
params{ alignment: 'center' | 'top' | 'bottom' | 'leading' | 'trailing' | 'topLeading' | 'topTrailing' | 'bottomLeading' | 'bottomTrailing', height: number, idealHeight: number, idealWidth: number, maxHeight: number, maxWidth: number, minHeight: number, minWidth: number, width: number }The frame parameters. Width, height, minWidth, maxWidth, minHeight, maxHeight, idealWidth, idealHeight and alignment.

Sets the frame properties of a view.

Returns: ModifierConfig

See: Official SwiftUI documentation.

Works with

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

Needs care

It works on these components, but not in the way that you may expect.

ComponentWhat to know
SpacerUse minWidth or minHeight to give the spacer a smallest size. A fixed size stops it from growing.
DividerSet the height for a horizontal divider, or the width for a vertical one. The other side fills the parent.

Sources

The original Expo docs for this page:

On this page