This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 57).
AlertDialog
A Jetpack Compose AlertDialog component for displaying native alert dialogs.
Expo UI AlertDialog matches the official Jetpack Compose AlertDialog API. Content is provided via slot sub-components (AlertDialog.Title, AlertDialog.Text, AlertDialog.ConfirmButton, AlertDialog.DismissButton, AlertDialog.Icon) that map directly to Compose's slot parameters.


Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic alert dialog
Custom colors
With icon
API
import { AlertDialog } from '@expo/ui/jetpack-compose';
Component
Type: React.Element<AlertDialogProps>
Renders an AlertDialog component with slot-based content matching the Compose API.
Content is provided via slot sub-components: AlertDialog.Title, AlertDialog.Text,
AlertDialog.ConfirmButton, AlertDialog.DismissButton, and AlertDialog.Icon.
ReactNodeChildren containing slot sub-components (AlertDialog.Title, AlertDialog.Text,
AlertDialog.ConfirmButton, AlertDialog.DismissButton, AlertDialog.Icon).
() => voidCallback that is called when the user tries to dismiss the dialog (for example, by tapping outside of it or pressing the back button).