---
title: Toast
description: A short message that confirms an action or reports its result.
---

<Component path="toast/basic" />

## Usage

```tsx
import { toast } from "@unkey/ui"

toast.success("Key created")
toast.error("Failed to delete key", { description: error.message })
toast.promise(request, {
  loading: "Deleting key...",
  success: "Key deleted",
  error: (err) => ({ message: "Failed to delete key", description: getErrorMessage(err) }),
})
```

## Icons

A multi-line toast has no icon. This includes a toast with a description and a title that wraps. Only a single-line toast shows its type icon.
