Overlays
Dialog
edits with a form
function DialogDemo() { return ( <Dialog> <DialogTrigger asChild> <Button variant="outline" className="w-full"> <Text>Open dialog</Text> </Button> </DialogTrigger> <DialogContent className="sm:max-w-[425px]"> <DialogHeader> <DialogTitle>Edit profile</DialogTitle> <DialogDescription>Make changes to your profile, then save.</DialogDescription> </DialogHeader> <View className="gap-3"> <Label htmlFor="dlg-name">Name</Label> <Input id="dlg-name" defaultValue="Jane Doe" /> </View> <DialogFooter> <DialogClose asChild> <Button variant="outline"> <Text>Cancel</Text> </Button> </DialogClose> <Button> <Text>Save</Text> </Button> </DialogFooter> </DialogContent> </Dialog> );}Usage
For edits with a form. Confirmations use AlertDialog.
API
<Dialog><DialogTrigger asChild /><DialogContent><DialogHeader /><DialogFooter /></DialogContent></Dialog>Get it
Already in every copy of the native kit:
import { Dialog } from '@/components/ui/dialog';Details
- Exports
Dialog- Packages
- @rn-primitives/dialog@^1.5.2, lucide-react-native@^1.21.0, react-native-reanimated@4.5.1, react-native-screens@~4.26.0
- Installs with
- @halftone-native/icon, @halftone-native/lib-utils, rnr/native-only-animated-view
- Also searched as
- modal, form modal
- Registry JSON
- /r/native/dialog.json
<Dialog> <DialogTrigger asChild> <Button variant="outline">Rename project</Button> </DialogTrigger> <DialogContent> <DialogHeader> <DialogTitle>Rename project</DialogTitle> <DialogDescription>Everyone with access sees the new name.</DialogDescription> </DialogHeader> <div className="grid gap-2"> <Label htmlFor="demo-project">Name</Label> <Input id="demo-project" defaultValue="Website relaunch" /> </div> <DialogFooter> <Button>Save</Button> </DialogFooter> </DialogContent></Dialog>API
<Dialog><DialogTrigger asChild /><DialogContent><DialogHeader><DialogTitle /></DialogHeader>…</DialogContent></Dialog>Get it
Already in every copy of the web kit:
import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose } from '@/components/ui/dialog';Details
- Exports
Dialog,DialogTrigger,DialogContent,DialogHeader,DialogTitle,DialogDescription,DialogFooter,DialogClose- Packages
- cn@^0.5.2, lucide-react@^1.52.0, radix-ui@^1.7.0
- Installs with
- @halftone-web/button
- Registry JSON
- /r/web/dialog.json
Agents: the whole registry is at /llms.txt.