Expo UI and Router for iOSExpo SDK 57 and later, iOS only
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

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

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