Modal
Dialog overlay for focused content
Displays content in a focused overlay dialog.
Usage
With title
Modal with a header showing title and close button.
Without title
Omit the title for custom layouts.
Props
| prop | type | default | description |
|---|---|---|---|
| open | boolean | required | Whether modal is visible |
| onClose | () => void | required | Callback when modal closes |
| title | string | - | Optional title in header |
| children | ReactNode | required | Modal content |
Features
- Closes on escape key
- Closes on backdrop click
- Prevents body scroll while open
- Blurred backdrop overlay
- Accessible with ARIA dialog role