Skip to content
Calm motion: animations on this site only fade, with no movement

Modal ​

Native <dialog>

A task that needs the attention of the whole screen before the user goes back: a form, a detail view, a picker. If it only needs a yes / no, use an AlertDialog. If the page must stay usable beside it, use 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
labelsPartial<{ close: string; }>—
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.