Alert Modal
Place this anywhere in your app
svelte
Loading...Static Mode
svelte
Loading...Dynamic Mode
Used to render custom UI such as inputs, forms, or any arbitrary markup inside the modal.
svelte
Loading...Use modalStore.update() for optional properties to keep defaults
| Name | Type | Default | Description |
|---|---|---|---|
| open | boolean | false | Decides if the modal is open |
| title | string | '' | (Required) |
| content | string | '' | (Optional) |
| confirmText | string | 'Confirm' | (Optional) |
| cancelText | string | 'Cancel' | (Optional) |
| onConfirm | function | void | Callback function when the confirm button is clicked. |
| onCancel | function | void | Callback function when the cancel button is clicked. (optional). |
| render | () => Snippet | null | Function that returns dynamic modal content. Used to render custom UI such as inputs, forms, or any arbitrary markup inside the modal. (Optional) |