← Design system

Modal

Interactive examples and usage for the Modal component.

Examples

Props

PropTypeDefaultDescription
openbooleanfalseWhether the modal is open
onclose() => voidundefinedCallback when the modal is closed
size'sm' | 'md' | 'lg' | 'xl' | 'full''md'Modal width
closeOnOverlayClickbooleantrueClose when clicking the backdrop overlay
titlestringundefinedModal heading text
showCloseButtonbooleantrueShow the close button in the header

Keyboard

KeyAction
EscapeClose the modal
TabCycle focus through focusable elements (trapped inside modal)
Shift + TabCycle focus backwards (trapped inside modal)