Skip to content

Toaster

Bake your Toast and let it fly! You should insert in into your <body>

View Source 

Usage

css
@import "winduum/src/components/toaster/index.css" layer(components);

Variants

  • default 

Installation

Follow instructions for individual framework usage below

  • winduum 
  • winduum-stimulus 

Example

html
<ol class="x-toaster items-end"></ol>

closeToaster

  • Type: (selector: HTMLElement, options?: CloseToastOptions) => Promise<void>
  • Kind: async

All toasts are closed at once.

Example

js
import { showToast } from 'winduum/src/components/toaster'

document.querySelector('#closeToaster').addEventListener('click', async () => {
    await closeToaster(document.querySelector('.c-toaster'))
})

Released under the MIT License.