> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unbound.rip/llms.txt
> Use this file to discover all available pages before exploring further.

# Toasts

> Show transient, non-blocking notifications to the user.

### Showing a toast

A toast is a brief, non-blocking message that slides in, lingers, and slides out: the right tool for "Copied!" or "Settings saved" feedback. `showToast` displays one and returns a handle for controlling it. If you don't pass an `id`, one is generated for you.

```ts theme={null}
import { toasts } from '@unbound-app/api';

toasts.showToast({ content: 'Copied to clipboard' });
```

### Toast handles

The returned handle is your reference to the toast after it's shown. Use it to dismiss the toast early instead of waiting for it to time out.

```ts theme={null}
import { toasts } from '@unbound-app/api';

const toast = toasts.showToast({ content: 'Uploading...' });

// later, once the work finishes:
toast.close();
```

<Tip>
  Pass a stable `id` when a toast should *replace* a previous one rather than stack, handy for progress updates that shouldn't pile up on screen.
</Tip>
