Expo UI and Router for iOS
Modifiers

id

Attaches a stable identifier to a view so it can be referenced by scroll target bindings. Use with scrollTargetLayout() on the containing stack and the scrollPosition modifier on a scrollable container.

id(value)

ParameterTypeDescription
valuestringString identifier matched by scrollPosition's observable state.

Attaches a stable identifier to a view so it can be referenced by scroll target bindings. Use with scrollTargetLayout() on the containing stack and the scrollPosition modifier on a scrollable container.

Returns: ModifierConfig

See: Official SwiftUI documentation.

Works with

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

Sources

The original Expo docs for this page:

  • id (Modifiers) (source-of-truth/versions/v57.0.0/sdk/ui/swift-ui/modifiers.md)

On this page