Simple modal layout with morphing transition from trigger element to modal content.
esc
key.npm i svelte-morphing-modal --save-dev
yarn add svelte-morphing-modal
CDN: UNPKG | jsDelivr (available as window.MorphingModal
)
<MorphingModal {open}>
<button>Open modal</button>
<div slot="content">
<p>Modal content</p>
</div>
</MorphingModal>
<script>
import MorphingModal from 'svelte-morphing-modal';
let open
</script>
If you are not using using es6, instead of importing add
<script src="/path/to/svelte-morphing-modal/index.js"></script>
just before closing body tag.
MIT © PaulMaly