Toast

Announce a transient status message.

Examples

Installation

Install the package, then import only the components a route uses. Exports are tree-shakable.

Install
pnpm add fractalsvelte
Import
<script lang="ts">
	import { Toast } from 'fractalsvelte';
</script>

Usage

Usage
<script lang="ts">
	import { Toast } from 'fractalsvelte';
</script>

<Toast />

Props

PropTypeDefaultDescription
messagestring-The message text.
openbooleantrueWhether the surface is open. Supports bind:.
durationnumber0Auto-dismiss delay in milliseconds; 0 keeps it open.
tone'neutral' | 'accent''neutral'Visual emphasis of the component.
onclose() => void-Called when the surface closes.