AlertDialog
Install
Section titled “Install”npx stylesheet-ui add alert-dialogAlso installs modal as a dependency.
import { useState } from "react";import { AlertDialog } from "@/components/ui/alert-dialog";import { Button } from "@/components/ui/button";
function DeleteAccount() { const [open, setOpen] = useState(false); return ( <> <Button variant="destructive" onPress={() => setOpen(true)}>Delete</Button> <AlertDialog visible={open} title="Delete account?" description="This cannot be undone." confirmLabel="Delete" destructive onCancel={() => setOpen(false)} onConfirm={() => setOpen(false)} /> </> );}