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
- 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 itstitle. dismissible(default) also closes it on a backdrop click.hashties it to the URL, so a link can open it and Back closes it.
Usage
ts
import { BlessModal } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
title | string | — | |
hash | string | — | open when location.hash matches; open/close updates the hash (saenai-style deep links) |
size | "md" | "sm" | "lg" | "full" | "md" | |
dismissible | boolean | true | click on backdrop closes |
closeLabel | string | "Close" | |
modelValue | boolean | false |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: boolean] | |
close | [] |
Slots
| Name | Scope | Description |
|---|---|---|
title | — | |
default | — | |
footer | — |