Center Morph Modal

New

A composable modal whose full-size surface unfolds from its exact center toward every edge, then folds back the same way with an inset close control.

Updated

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/center-morph-modal

API Reference

CenterMorphModal

open?
boolean

Controlled open state.

defaultOpen?
boolean

Initial state when used uncontrolled.

false
onOpenChange?
((open: boolean) => void)

CenterMorphModalContent

ariaLabel
string

Accessible name announced by screen readers.

ariaDescribedBy?
string

Optional id of descriptive content inside the modal.

dismissible?
boolean

Close on Escape or backdrop press. Default true.

true
showCloseButton?
boolean

Render the close control inside the panel's top-right corner. Default true.

true
closeButtonLabel?
string
Close modal
className?
string
backdropClassName?
string

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.