Skip to content

Toast

Make sure to include the Toaster component inside the provider to enable toast notifications.

For installation and setup instructions, see the Getting Started guide.

Recommended: Place this in src/routes/+layout.svelte (SvelteKit root layout)

<script lang="ts">
import { Provider, Toaster } from "@fefade-ui/svelte"
</script>
<Provider>
<Toaster />
{@render children()}
</Provider>
PropTypeDefaultDescription
messagestringThe text content to display inside the toast.
colorstring"primary"The color variant of the toast (e.g., success, error, warning, info).
durationnumber5000Duration in milliseconds before the toast automatically closes.
position"top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center""top-right"Position on the screen where the toast appears.
isClosablebooleanfalseWhether the toast shows a close button.
withProgressLoaderbooleanfalseWhether a progress bar is displayed indicating remaining duration.