Skip to content

Modal ​

Native <dialog>

A task that needs the whole screen's attention before going back — a form, a detail view, a picker. If it only needs a yes / no, use an AlertDialog; if the page should stay usable beside it, a Sheet.

Basic

Blu-ray Disc BOX

native <dialog>: focus trap, Esc, backdrop click, top layer.

Hash
Open via #chara-megumi

加藤恵

opened from the URL hash — reload keeps it open, closing clears the hash.

  • A native <dialog>: the page behind is inert, Tab stays inside, Esc closes it, and focus returns to what opened it. It is named by its title.
  • dismissible (default) also closes it on a backdrop click. hash ties it to the URL, so a link can open it and Back closes it.

Usage ​

ts
import { BlessModal } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
titlestring—
hashstring—open when location.hash matches; open/close updates the hash (saenai-style deep links)
size"md" | "sm" | "lg" | "full""md"
dismissiblebooleantrueclick on backdrop closes
closeLabelstring"Close"
modelValuebooleanfalse

Events

NamePayloadDescription
update:modelValue[value: boolean]
close[]

Slots

NameScopeDescription
title—
default—
footer—

Released under the MIT License. Character names and artwork belong to their owners.