@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Service for showing auto-dismissing toast notifications.

    Inject this service and call one of the convenience methods (info, success, warning, error) or use show() for full control.

    The toast container component (<ui-toast-container>) must be placed somewhere in the application template (typically in the root component) for toasts to be rendered.

    private readonly toast = inject(ToastService);

    save(): void {
    this.toast.success('Document saved');
    }
    Index

    Constructors

    Properties

    toasts: WritableSignal<readonly ToastInstance[]> = ...

    All currently active toast instances.

    Methods

    • Remove all toasts.

      Returns void

    • Dismiss a toast by ID with exit animation.

      Parameters

      • id: string

      Returns void

    • Show an error toast.

      Parameters

      Returns string

    • Show an informational toast.

      Parameters

      Returns string

    • Immediately remove a toast without animation.

      Parameters

      • id: string

      Returns void

    • Show a toast with full configuration.

      Parameters

      Returns string

      The unique ID of the created toast.

    • Show a success toast.

      Parameters

      Returns string

    • Show a warning toast.

      Parameters

      Returns string