Skip to main content
zerotal

Documentation


Documentation / @zerotal/flow / index / FlashMessage

Interface: FlashMessage

Defined in: flow/src/types.ts:194

A flash notification payload (server → client). message/level are the core; everything else is an optional per-toast override of the <Flash> defaults.

Extended by

Properties

message

message: string

Defined in: flow/src/types.ts:195


level

level: "error" | "success" | "warning" | "info"

Defined in: flow/src/types.ts:196


title?

optional title?: string

Defined in: flow/src/types.ts:198

Bold header rendered above the message.


position?

optional position?: FlashPosition

Defined in: flow/src/types.ts:200

Override the <Flash> container position for this toast.


duration?

optional duration?: number

Defined in: flow/src/types.ts:202

Auto-dismiss after N ms. 0 (or negative) keeps it until dismissed.


dismissible?

optional dismissible?: boolean

Defined in: flow/src/types.ts:204

Render a close (×) button. Forced on when the toast doesn't auto-dismiss.


icon?

optional icon?: string | false

Defined in: flow/src/types.ts:206

Custom icon (emoji/text), or false to hide the status icon.


progressBar?

optional progressBar?: boolean

Defined in: flow/src/types.ts:208

Show a countdown progress bar (only meaningful while auto-dismissing).


actions?

optional actions?: FlashAction[]

Defined in: flow/src/types.ts:210

Action buttons (e.g. "Undo") that each invoke a @expose method on click.


onClose?

optional onClose?: FlashCallback

Defined in: flow/src/types.ts:212

A @expose method invoked when the toast is dismissed (any path).