变形弹窗

类似 Family App 风格的弹窗。单一面板会随内部视图切换而变形高度,内容以模糊交叉淡化过渡。

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

安装

用 shadcn CLI 添加,或手动复制源码。

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

API 参考

viewId
string | null

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

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

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

bottom
className?
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.