Lazy Loading

Modal components can be lazy loaded when using openModals

import { openModal } from 'svelte-modals'

openModal(() => import('./AlertModal.svelte'), {
  title: 'Lazy Modal',
  message: 'This modal was loaded lazily'
})

While the component is loading, the <Modal /> component will render the backdrop and loading slots.

See Modal API