- Implementation
- Dialog Props
- DialogPrimaryAction
Common Examples
To use theDialog, pass the required title and content. Open it with an Anvil2 RN Button through trigger, or control it with isOpen and onOpenChange.Actions
PassprimaryAction for the confirm action and secondaryAction for dismissal. The dialog fixes both buttons at medium size and fixes the secondary action to the secondary variant. The dialog closes after each footer press; the button’s own onPress fires first.variant: "danger" on primaryAction for destructive confirmation.Open state
When you passisOpen, onOpenChange is required so the header close, scrim, Android back, and footer actions can request a close.isDismissable={false} to keep the scrim and Android back from closing the dialog. The header close still dismisses.Accessibility
- The required
titleis a heading that names the modal. The dialog setsaccessibilityViewIsModal. - The header close control is a button named
"Close"(English until the kit gains i18n). - Long
contentscrolls inside the surface.