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

alignmentGuide

Sets the position of a horizontal alignment guide of this view.

alignmentGuide(guide, value)

ParameterTypeDescription
guide'center' | 'leading' | 'trailing' | 'listRowSeparatorLeading' | 'listRowSeparatorTrailing'The horizontal alignment guide to set. 'listRowSeparatorLeading' and 'listRowSeparatorTrailing' do nothing on tvOS, where SwiftUI does not provide them.
valuenumberThe position of the guide, in points from the leading edge of the view.

Sets the position of a horizontal alignment guide of this view.

Use the 'listRowSeparatorLeading' guide to set where the separator of a List row starts. SwiftUI insets a row separator past a leading Image, but not past other leading content, so rows with different leading content get separators that start at different offsets.

Returns: ModifierConfig

See: Official SwiftUI documentation.

Example

<HStack modifiers={[alignmentGuide('listRowSeparatorLeading', 32)]}>
  <Text>A</Text>
  <Text>The separator starts 32 points from the leading edge</Text>
</HStack>

Works with

Works only in some places

Has an effect only when the parent, such as a VStack or ZStack, aligns its children by the same guide.

You can add it to any of these components, but it does something only in the place above.

Sources

The original Expo docs for this page:

On this page