Expo UI and Router for iOS
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

This modifier works with any view. These components accept it:

Sources

The original Expo docs for this page:

On this page