Modal
overlaysAccessible modal dialog with overlay backdrop, escape key close, body scroll lock, slide-up animation, close button, and optional title. Uses role=dialog with aria-modal=true.
Import
typescript
import { Modal } from "packages/ui/src";Props
ModalProps
| Prop | Type | Required |
|---|---|---|
open | boolean | Yes |
onClose | () => void, title?: string, children: ReactNode, className?: string | Yes |
Examples
Basic Modal
Simple modal with just body content. Click overlay or press Escape to close.
Titled Modal
Modal with header title and close button.
Long Content Modal
Modal with scrollable content. Body scroll is locked while open.