Svelte DaisyUI Toast

Svelte DaisyUI Toast

A simple toaster component for Svelte with DaisyUI.
Inspired by Svelte French Toast.

Source
Version 1.1.1

1. Install

npm install @natoune/svelte-daisyui-toast

2. Usage

Mount a <Toaster /> at the top level of your app and use the toast API to display toasts.

<script>
	import toast, { Toaster } from '@natoune/svelte-daisyui-toast'

	function handleClick() {
		toast.success('Hello, world!')
	}
</script>

<Toaster />
<button type="button" onclick={handleClick}>Toast</button>

Examples

toast("Hello, world!", {
	position: "bottom-end",
	duration: 3000,
});