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

padding

Sets padding on a view. Supports individual edges or shorthand properties.

padding(params)

ParameterTypeDescription
params(optional){ all: number, bottom: number, horizontal: number, leading: number, top: number, trailing: number, vertical: number }The padding parameters: top, bottom, leading, trailing, horizontal, vertical and all.

Sets padding on a view. Supports individual edges or shorthand properties.

Returns: ModifierConfig

See: Official SwiftUI documentation.

Works with

You can add padding 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
GroupSwiftUI gives the padding to each child of the Group, not to the group as one view.
SectionIt changes the whole section, not one row. For one row, put it on the view in the row.

Sources

The original Expo docs for this page:

On this page