An emoji showing crossed fingers svelte-promise-modals


Modals in Svelte made easy. Promised.🤞

Example for the modal

  import { openModal } from 'svelte-promise-modals';
  import FooComponent from './FooComponent.svelte';

  async function openFooModal() {
    let result = await openModal(FooComponent);
    console.log(result); // Whatever the modal returned when it was closed

<button type="button" on:click={() => openFooModal()}>
  A simple modal with a button to close it

Example for custom animations

Code for the demonstrations shown here can be found in the demo application of the addon.

See the README on GitHub for setup & further instructions.

A red heart

svelte-promise-modals is
made & sponsored with ❤️ by


yellow heart
smiley face surrounded by hearts