Expo UI and Router for iOS
Modifiers

accessibilityIdentifier

Sets an accessibility identifier for the view.

accessibilityIdentifier(identifier)

ParameterTypeDescription
identifierstringThe accessibility identifier used for UI testing.

Sets an accessibility identifier for the view.

Unlike accessibilityLabel, this value is for UI testing and is not visible to the user. UI testing tools such as XCUITest read it to locate the view, so prefer a stable, machine-readable identifier here.

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:

On this page