Modal

ARIA
RTL

A modal is an interface element that appears over other content. It requires an interaction from the user before they can return to whatever is underneath.

Based on Headless UI.

Modal

Anatomy

<Modal>
  <Modal.Backdrop />
  <Modal.Title>...<Modal.Title>
  <Modal.Panel>...<Modal.Panel>
</Modal>

Default

Example with big content

Example with styled content

Example with Select

Modal

NameTypeRequiredDefaultDescription
openbooleanYes-Whether the Modal is open or not.
onClose() => voidYes-Called when the Modal is dismissed.

Modal.Panel

NameTypeRequiredDefaultDescription
classNamestringYes-Tailwind classes for customization of Panel.

Modal.Backdrop

NameTypeRequiredDefaultDescription
classNamestringYes-Tailwind classes for customization of Backdrop.