# toastClose

> Removes toast `id` from `toaster` when its `<dialog>` host closes, which its close button does natively through the `close` command.

```ts
import { toastClose } from "@sdxc/ui/app";
```

Removes toast `id` from `toaster` when its `<dialog>` host closes, which its
close button does natively through the `close` command.

## Signature

```ts
toastClose(toaster: Toaster<unknown>, id: string): MixinDescriptor<HTMLDialogElement>
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `toaster` | `Toaster<unknown>` |  |
| `id` | `string` |  |

## Examples

```tsx
<dialog open id="toast-1" mix={[toastClose(toaster, "1")]}>…</dialog>
```
