JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q52668F

Create a reusable Qwik Toast library

Package Exports

  • qwik-toasts

Readme

Qwik-Toast Library ⚡️

Qwik-Toast is a versatile toast notification library built on top of Qwik. It provides a simple and efficient way to display informative messages to users in your web applications.


Installation

npm install qwik-toast

or if you use bun:

bun install qwik-toast

Project Structure

Inside your Qwik-Toast project, you'll find the following directories and files:

├── example/
│   └── ...
└── src/
    ├── components/toast
    │              └── ...
    └── index.ts
  • src/components/toast: This directory is a location for Qwik-Toast components.

  • index.ts: The entry point of your Qwik-Toast library.

  • example/: Contains an example showcasing the usage of Qwik-Toast.

Development

During development, Qwik-Toast uses Vite's development server with server-side rendering (SSR) capabilities provided by Qwik and Bun. Bun is an all-in-one JavaScript runtime & toolkit designed for speed, complete with a bundler, test runner, and Node.js-compatible package manager.

Start development:

bun start

Production

For production, the Qwik-Toast library should generate the production build in the ./lib directory, along with TypeScript type definitions in ./lib-types.

bun run build

Example

Check out the example located in the /example directory to see Qwik-Toast in action.

Qwik-Toast Example Video

Add Tailwind and Daisyui:

bun run qwik add tailwind
bun add -D daisyui

Then add daisyUI to your tailwind.config.js files:

module.exports = {
  //...
  plugins: [require("daisyui")],
}

Install dependencies:

bun install

Run:

bun start