https://github.com/dashpilot/tiny-modal-web-component
A tiny modal web component made with Svelte
https://github.com/dashpilot/tiny-modal-web-component
Last synced: 4 months ago
JSON representation
A tiny modal web component made with Svelte
- Host: GitHub
- URL: https://github.com/dashpilot/tiny-modal-web-component
- Owner: dashpilot
- Created: 2022-02-09T03:14:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-09T14:40:50.000Z (over 4 years ago)
- Last Synced: 2025-10-08T13:56:44.959Z (8 months ago)
- Language: HTML
- Homepage: tiny-modal-web-component.vercel.app
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tiny-modal-web-component
Lightweight modal web component made with Svelte
## Demo
## Usage
Grab the files from CDN:
```
```
Then just slot the modal-content within the web component, like so:
This is some modal content
To launch the modal, just add a data-attribute of `data-show="{id-of-modal}"` to your launch-button:
Launch Modal
To prevent the modal content from flashing onto the screen on page load, add the following style to your CSS:
tiny-modal{
display: none;
}