0.1.5 โข Published 5 months ago
@haebaragi/better-dialog v0.1.5
Better Dialog (ฮฒ)
A lightweight, flexible modal library powered by the native <dialog>
element.
๐ง This library is currently in beta. The API may change.
โจ Features
- Built on native
<dialog>
- Show/close lifecycle hooks
- Plugin & animation support
- No built-in styles
- Zero dependencies
๐ฆ Installation
npm install @haebaragi/better-dialog
๐ Documentation
Full usage examples, plugin guides, and API reference are available at:
๐ https://better-dialog.haebaragi.net
๐งช Quick Example
<button data-better-dialog-show="my-dialog">Open Dialog</button>
<dialog id="my-dialog">
<p>Hello, World!</p>
<button data-better-dialog-close>Close</button>
</dialog>
import { BetterDialog } from '@haebaragi/better-dialog';
import { fadeAnimation } from '@haebaragi/better-dialog/animations';
new BetterDialog('#my-dialog', {
animation: fadeAnimation({ duration: 300 }),
});
License
MIT
(c) 2025 @izakikazuho