Modal

Breaking news

Modals are used to display important information or prompts to the user.

Getting Started

Place this anywhere in your app

svelte
Loading...

The modal can exist in two modes: static and dynamic.

  1. Static Mode
  2. svelte
    Loading...
  3. Dynamic Mode
  4. Used to render custom UI such as inputs, forms, or any arbitrary markup inside the modal.

    svelte
    Loading...

Component API

Use modalStore.update() for optional properties to keep defaults

Component API

PropTypeDefaultDescription
openbooleanfalseDecides if the modal is open
titlestring""(Required)
titleFont, titleFontSize, titleFontWeightstringinherit, 1.3rem, inheritTitle styles
logo_url, logo_url_size, logo_url_spacingstring"", 30px, 1remLogo styles
contentstring""(Optional)
confirmTextstring'Confirm'(Optional)
cancelTextstring'Cancel'(Optional)
onConfirmfunctionvoidCallback function when the confirm button is clicked.
onCancelfunctionvoidCallback function when the cancel button is clicked. (optional).
render() => SnippetnullFunction that returns dynamic modal content. Used to render custom UI such as inputs, forms, or any arbitrary markup inside the modal. (Optional)
Edit Page

Last Updated: -

© 2026 @sierra-95/svelte-scaffold. All rights reserved.