This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
BasicAlertDialog
一个 Jetpack Compose BasicAlertDialog 组件,用于显示包含自定义内容的对话框。
Android
Included in Expo Go
Expo UI BasicAlertDialog 与官方 Jetpack Compose BasicAlertDialog API 相匹配,可显示一个简约对话框,并接受自定义子组件作为其内容,让你完全掌控对话框的布局


安装
Terminal
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
带自定义内容的基础对话框
BasicAlertDialogExample.tsx
API
import { BasicAlertDialog } from '@expo/ui/jetpack-compose';
Component
Type: React.Element<BasicAlertDialogProps>
A basic alert dialog that provides a blank container for custom content.
Unlike AlertDialog, this component does not have structured title/text/buttons slots.
Optional • Type:
() => voidCallback that is called when the user tries to dismiss the dialog (e.g. by tapping outside of it or pressing the back button).