[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/flow](../../README) / [index](../README) / Flash

# Function: Flash()

> **Flash**(`props?`): [`HtmlNode`](../type-aliases/HtmlNode)

Defined in: [flow/src/components.ts:277](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/components.ts#L277)

The toast host — a single fixed container plus the client runtime that renders
flash messages emitted by the server (via `flow:flash` window events) as styled,
self-dismissing toasts. Place it once, near the root of your layout.

## Parameters

### props?

[`FlashProps`](../interfaces/FlashProps) = `{}`

## Returns

[`HtmlNode`](../type-aliases/HtmlNode)

## Remarks

`position` (default `"bottom-right"`) and `duration` in ms (default `4000`) are the
defaults for toasts that don't specify their own; individual toasts can override
position, duration, icon, actions and more via the emitted payload.

## Example

```tsx
<Flash position="top-right" duration={6000} />
```
