Skip to content

Dialog (organism) ​

MUI Dialog + sub-parts. Replaces src/components/ui/dialog.tsx.

  • Layer: organism · Status: WRAP · Import: import { Dialog, DialogHeader, DialogTitle, DialogDescription, DialogContent, DialogFooter } from "@/design-system"

Live demo ​

API differs from shadcn (controlled, not trigger-based) ​

The shadcn/Radix Dialog was trigger-driven (DialogTrigger/DialogPortal/DialogClose, open/onOpenChange). MUI Dialog is controlled — drive it with your own open state and onClose. There is no DialogTrigger or DialogClose; render your own buttons.

ExportMaps to
DialogMUI Dialog (open, onClose)
DialogTitleMUI DialogTitle + <Text brand="cardTitle">
DialogDescriptionmuted <Text>
DialogContentMUI DialogContent
DialogFooterMUI DialogActions
DialogHeadergrouping box

Paper: 8px radius, divider border, paper surface (theme MuiDialog).

Behavior (→ tests) ​

  • open → renders role="dialog" with title + content; open={false} → nothing rendered.

Usage ​

tsx
const [open, setOpen] = useState(false);
<Button onClick={() => setOpen(true)}>Open</Button>
<Dialog open={open} onClose={() => setOpen(false)}>
  <DialogContent>
    <DialogHeader>
      <DialogTitle>Delete project?</DialogTitle>
      <DialogDescription>This action cannot be undone.</DialogDescription>
    </DialogHeader>
  </DialogContent>
  <DialogFooter>
    <Button variant="ghost" onClick={() => setOpen(false)}>Cancel</Button>
    <Button variant="destructive" onClick={confirm}>Delete</Button>
  </DialogFooter>
</Dialog>

Built on MUI Core (MIT). Part of the Tech Fleet Network monorepo.