Getting Started
Svelte Modals is a modal manager for Svelte. It provides APIs for opening and closing modals, but leaves functionality and styling of those modals up to you.
Installation
Add <Modals /> to your app
All opened modals will be rendered inside <Modals />
. If you’re using SvelteKit, +layout.svelte
would be appropriate
place to put it. Otherwise, wherever you want the modals to be rendered.
Create your Modal component
Let’s create a basic modal component:
Try it out
Import modals
anywhere in your app to open or close your modals