Toast
Brief feedback notifications at the bottom of the Vicinae window.

showToast
import { showToast, Toast } from "@vicinae/api";
await showToast({ title: "Fruit added", style: Toast.Style.Success });
Non-animated toasts will automatically be dismissed after some time. This is not configurable at the extension level.
It is undefined behavior to show multiple toasts at once: no specific order is guaranteed.
Styles
| Style | Description |
|---|---|
Toast.Style.Success | Something succeeded |
Toast.Style.Failure | Something failed |
Toast.Style.Animated | Spinning indicator for ongoing operations |
Animated Toast
Show a loading toast and update it when the operation completes.
import { showToast, Toast } from "@vicinae/api";
const toast = await showToast({ title: "Uploading...", style: Toast.Style.Animated });
// ... do work ...
// assigning these properties immediately updates the toast
toast.style = Toast.Style.Success;
toast.title = "Upload complete";
Error Handling
import { showToast, Toast } from "@vicinae/api";
try {
await fetchFruits();
await showToast({ title: "Loaded fruits" });
} catch (error) {
await showToast({ title: "Failed to load", message: String(error), style: Toast.Style.Failure });
}