Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Morphing Modal

Preview

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

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/morphing-modal

Import the shared styles once in your application.

TSUsage
import MorphingModal from '@/components/beui/layout/MorphingModal.vue'
import '@/components/beui/styles.css'

API Reference

v-model:viewId?
string | null

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

Defaultnull
@close?
() => void
Default—
placement?
"bottom" | "center"

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

Defaultbottom
ariaLabel?
string

Alias of `label`, named after the React prop.

Default—
class?
string
Default—
labels?
Partial<MorphingModalMessages>

Override any built-in string.

Default—
label?
string

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

Default—
Also on React Native. A card that springs to the size of each view you open in it.(opens in a new tab)

Updated