wc-beru
v0.1.7
Published
Wc-Beru is a web component Toast. It allows you to easily integrate beautiful and accessible toasts into any web project, regardless of the framework you are using.
Downloads
190
Readme
wc-beru
Wc-Beru is a web component Toast. It allows you to easily integrate beautiful and accessible toasts into any web project, regardless of the framework you are using.
Installation
To use wc-beru in your project, you can install it via pnpm (or npm/yarn):
pnpm add wc-beruUsage
Once installed, you can import and use the web component directly in your HTML or JavaScript:
<!-- In your HTML -->
<wc-beru></wc-beru>
<div id="app">
<button id="btn">Push me</button>
</div>import { toast } from 'wc-beru';
const button = document.getElementById('btn')
button.addEventListener('click', () => {
toast.display('Hello world from WcBeru')
})Development
To set up the project locally, follow these steps:
Clone the repository:
git clone https://github.com/alamguardin/wc-beru.git cd wc-beruInstall dependencies:
pnpm installRun the development server:
pnpm devThis will start a Vite development server, and you can view the examples in your browser.
Build the project:
pnpm buildThis will build the web component for production, outputting the files to the
distdirectory.
Contributing
Contributions are welcome! Please feel free to open issues or submit pull requests.
