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 fractalsvelteImport
<script lang="ts">
import { Toast } from 'fractalsvelte';
</script>Usage
Usage
<script lang="ts">
import { Toast } from 'fractalsvelte';
</script>
<Toast />Props
| Prop | Type | Default | Description |
|---|---|---|---|
message | string | - | The message text. |
open | boolean | true | Whether the surface is open. Supports bind:. |
duration | number | 0 | Auto-dismiss delay in milliseconds; 0 keeps it open. |
tone | 'neutral' | 'accent' | 'neutral' | Visual emphasis of the component. |
onclose | () => void | - | Called when the surface closes. |
