Morphing Modal

A modal for multi-step flows, inspired by the Family app: change viewId and one panel resizes to fit the next screen while the old content blurs out and the new content blurs in. Anchors to the bottom like a sheet or sits centered.

Preview

Morphing Modal preview width

Install

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

$ bunx --bun shadcn add @karaui/morphing-modal
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

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
—

Updated