This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Alert
A SwiftUI Alert component for presenting native iOS alert dialogs.
Expo UI Alert matches the official SwiftUI alert API and presents a native iOS alert dialog with a title, actions, and an optional message.


Alert is the centered modal counterpart to ConfirmationDialog, which renders as an action sheet from the bottom of the screen. Both share the same trigger/actions/message slot model so callers can swap between them by changing the component name.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic alert
Use Alert.Trigger to define the visible element and Alert.Actions to provide the dialog buttons.
Cancel and confirm
Combine role="cancel" with a confirm button to build a standard yes/no alert.
Destructive action
Use role="destructive" on a Button inside Alert.Actions to style it as a destructive action.
API
import { Alert } from '@expo/ui/swift-ui';
Component
Type: React.Element<AlertProps>
Alert presents a SwiftUI alert with a title, optional message, and action buttons.
See: Official SwiftUI documentation.