Skip to main content
cngx-src documentation

ToastConfig

Interface

projects/ui/feedback/toast/toast.service.ts

Referenced by#

Import#

import { ToastConfig } from '@cngx/ui/feedback'

Description#

Configuration for a single toast.

Index#

Instance Properties#

action#literal type
Optional

Optional action button inside the toast.

content#Type
Optional

Custom component rendered as the toast body (Stufe 2). Replaces the default message/description text. title is still rendered above the component if set.

A11y: avoid focusable elements (<a>, <button>, <input>) inside the component - they are unreachable inside a role="status" live region.

contentInputs#Record
Optional

Inputs passed to the content component via NgComponentOutlet.

description#string
Optional

Secondary description text - renders below title. Falls back to message when title is set but description is not. Ignored when title is not set.

dismissible#boolean
Optional

Show dismiss button.

duration#number | "persistent"
Optional

Auto-dismiss duration in ms, or 'persistent' for manual dismiss only.

message#string

Toast message text. Used as sole text when title is not set.

Optional

Visual severity - determines icon, color, and ARIA role.

title#string
Optional

Bold primary text - renders above description or message. When set, the toast switches to a two-line layout (title + description). When not set, message renders as a single line (backwards-compatible).