# clanbite.toasts.element

Lets a handler build the toast element itself (custom markup).

Return an `HTMLElement` to use it instead of the default. Clanbite still places it in the stack and runs the
timer, hover pause, `Escape` and overflow handling; add your own close control that calls `handle.dismiss()`.
Return `null` (the default) for the standard toast.

```php
wp.hooks.applyFilters( 'clanbite.toasts.element', HTMLElement|null element, Object payload, {{id: string, element: HTMLElement}} handle )
```

## Parameters

- `$element` (HTMLElement|null) Default `null`.
- `$payload` (Object) Toast options.
- `$handle` ({{id: string, element: HTMLElement}}) The toast handle (`element` is set after this filter).

## Changelog

| Version | Description |
| --- | --- |
| 1.5.0 | Introduced |
