01
Overview
Mount ModalRegion once in a context boundary and call useModal().openModal or useModal().confirm from descendants. State is scoped to the region and safe during SSR.
02
When to use
Use when
- Application code must open deduplicated modals or await a confirmation result imperatively.
Avoid when
- A single declarative modal is sufficient; use Modal directly.
03
Examples
Basic modal region
Mount application content inside the modal coordination region.
04
Props
Name | Type | Default | Description |
|---|---|---|---|
children | import('svelte').Snippet |