Modal

Centered dialog built on Radix Dialog. Four size variants.

Installation

Examples

Basic modal

Title, description, content, and action footer.

Delete project

This action cannot be undone.

Are you sure you want to delete this project?

Sizes

sm, md, lg, xl, full.

sm
md
lg
xl

API Reference

PropTypeDefaultDescription
openboolean—Controlled open state.
onOpenChange(v: boolean) => void—Called when state changes.
size'sm'|'md'|'lg'|'xl'|'full''md'Controls max-width.
titlestring—Modal heading.
descriptionstring—Modal subheading.
preventClosebooleanfalseBlocks closing on backdrop click.