A Toast with a certain style, title, and message.
import { showToast, Toast } from "@raycast/api";import { setTimeout } from "timers/promises";export default async () => { const toast = await showToast({ style: Toast.Style.Animated, title: "Uploading image" }); await setTimeout(1000); toast.style = Toast.Style.Success; toast.title = "Uploaded image";}; Copy
import { showToast, Toast } from "@raycast/api";import { setTimeout } from "timers/promises";export default async () => { const toast = await showToast({ style: Toast.Style.Animated, title: "Uploading image" }); await setTimeout(1000); toast.style = Toast.Style.Success; toast.title = "Uploaded image";};
Deprecated - Use showToast instead
showToast
An additional message for the Toast. Useful to show more information, e.g. an identifier of a newly created asset.
The style of a Toast.
The title of a Toast. Displayed on the top.
Hides the Toast.
A Promise that resolves when toast is hidden.
Shows the Toast.
A Promise that resolves when the toast is shown.
The primary Action the user can take when hovering on the Toast.
A Toast with a certain style, title, and message.
Example