Toast

A transient notification system for updates, actions, and async work.

The Toast Component

Basic Usage

Code Snippet

<script lang="ts">		import { Button, Toast, toast } from '$lib/components'; 		const notify = () => {			toast.success({				title: 'Campaign scheduled',				description: 'The launch email is queued for tomorrow morning.'			});		};	</script> 	<Toast />	<Button onclick={notify}>Show toast</Button>

Examples

Promise Updates

Use the toast API to reflect loading, success, and failure across async work.