Skip to content

Modal

stable

Full-featured modal wrapper with header, body, and footer slots

OverlaysInteractive/Storybook ↗
import { Modal } from "@danagraph/design-system"
Loading demo…

Props

open
Type booleanDefault —

Controlled open state

onOpenChange
Type (open: boolean) => voidDefault —

Called when open state changes

size
Type "default" | "sm" | "lg" | "xl" | "full"Default "default"

ModalContent width preset

showCloseButton
Type booleanDefault true

Show close button in corner

titlerequired
Type stringDefault —

ConfirmModal heading

description
Type stringDefault —

ConfirmModal body text

confirmLabel
Type stringDefault "Confirm"

ConfirmModal confirm button text

cancelLabel
Type stringDefault "Cancel"

ConfirmModal cancel button text

variant
Type "default" | "destructive"Default "default"

ConfirmModal visual tone

onConfirmrequired
Type () => voidDefault —

ConfirmModal confirm callback

semantictypebordersurface
MobileTouch Target

Full-screen on mobile. All interactive controls inside the modal (buttons, close) must meet 44px minimum.

Design Rationale

This component was designed to express:

Explore Related

Was this helpful?