Skip to content
On this page

Dialog

Basic

ADialog component uses ACard as its base. Bind ADialog with v-model to hide and show dialog/card.

All props & slots available in ACard is available in ADialog.

Width

Use width utility classes to provide custom width to dialog. e.g. w-[800px].

Persistent

You can disable closing dialog on outside click via persistent prop.


📖 You don't need a modal window

Nice article on why you don't need a modal window.

API

Dialog

modelValue : boolean

Show/Hide menu base on v-model value

variant : LayerVariant

Layer variant

states : boolean

Interaction states like hover & active

loading : boolean | ALoaderProps

Set loading state

titleTag : string

Tag to use for title of the component

subtitleTag : string

Tag to use for subtitle of the component

textTag : string

Tag to use for text rendered via text prop

persistent : boolean

Persistence of dialog when clicked outside of reference element

text : ConfigurableValue

Typography text content

color : ColorProp

Layer color

title : ConfigurableValue

Typography title

subtitle : ConfigurableValue

Typography subtitle

img : string

Render image at the top of the card (above header)

imgAlt : string

alt attribute for image rendered via img prop

default : any

Default slot for rendering card content

title : any

Render custom content for title

subtitle : any

Render custom content for subtitle

header-right : any

Render custom content on right side of title & subtitle. Content inside this slot will be vertically centered to title & subtitle.

update:modelValue => [value: boolean]

Released under the MIT License.