# ToastBeforeCloseEvent (@salmonui/notifications/toast)

> The ToastBeforeCloseEvent interface of @salmonui/notifications/toast: Passed to onBeforeClose; preventDefault() keeps the toast open.

Canonical: https://salmonui.dev/docs/reference/notifications/toast/ToastBeforeCloseEvent

```ts
import type { ToastBeforeCloseEvent } from '@salmonui/notifications/toast';
```

Entry index: https://salmonui.dev/docs/reference/notifications/toast (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/notifications/toast.md).

## Reference

Kind: interface

```ts
interface ToastBeforeCloseEvent {
    readonly id: string;
    readonly reason: ToastCloseReason;
    readonly defaultPrevented: boolean;
    preventDefault(): void;
}
```

Passed to `onBeforeClose`; `preventDefault()` keeps the toast open.

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id: string;` |  |  |
| `reason` | `readonly reason: ToastCloseReason;` |  |  |
| `defaultPrevented` | `readonly defaultPrevented: boolean;` |  |  |
| `preventDefault` | `preventDefault(): void;` |  |  |
