Morphing Modal

Preview

Click a row. The modal morphs height to match new content.

Install

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

$ bunx --bun shadcn add @beui/morphing-modal

API Reference

viewId
string | null

Which view is currently shown. `null` closes the modal.

Default—
onClose
() => void
Default—
placement?
"bottom" | "center"

"bottom" anchors to the viewport bottom (mobile-like). "center" centers vertically.

Defaultbottom
ariaLabel?
string

Accessible name for the dialog. Without it, the dialog is named by the first heading in the current view.

Default—
className?
string
Default—
Also on React Native. A card that springs to the size of each view you open in it.

Updated