Overlays

ModalRegion

Context-scoped host for imperative Modal registration and promise-returning confirmations.

import { ModalRegion } from '@lostgradient/cinder/modal-region';
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.

Live preview
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

Props for modal-region
Name
Type
Default
Description
children import('svelte').Snippet