https://github.com/jill64/svelte-inline-modal
🪟 Simple Modal on the Fly
https://github.com/jill64/svelte-inline-modal
inline library modal onthefly svelte
Last synced: 3 months ago
JSON representation
🪟 Simple Modal on the Fly
- Host: GitHub
- URL: https://github.com/jill64/svelte-inline-modal
- Owner: jill64
- License: mit
- Created: 2023-09-06T06:44:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-14T19:48:30.000Z (3 months ago)
- Last Synced: 2025-04-14T20:37:46.160Z (3 months ago)
- Topics: inline, library, modal, onthefly, svelte
- Language: Svelte
- Homepage: https://svelte-inline-modal.jill64.dev
- Size: 4 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# svelte-inline-modal
🪟 Simple Modal on the Fly
## [Demo](https://svelte-inline-modal.jill64.dev)
[StackBlitz](https://stackblitz.com/edit/svelte-inline-modal?file=src%2Froutes%2FDemo.svelte)
## Installation
```bash
npm i svelte-inline-modal
```## Usage
Unlike most modal libraries that provide a common component at the root, this library deploys the modal in place using the dialog element.
```svelte
import { InlineModal } from 'svelte-inline-modal'
const onCloseModal = () => {
// ...
}{#snippet button(open)}
Open
{/snippet}
{#snippet menu(close)}
Close
{/snippet}```
## License
[MIT](LICENSE)