Backstage
    Preparing search index...

    The alert API is used to report alerts to the app, and display them to the user.

    Use ToastApi instead. AlertApi will be removed in a future release.

    ToastApi provides richer notification features including:

    • Title and optional description
    • Action links
    • Custom icons
    • Per-toast timeout control
    • Programmatic dismiss via returned key
    // Before (AlertApi)
    alertApi.post({ message: 'Saved!', severity: 'success', display: 'transient' });

    // After (ToastApi)
    toastApi.post({ title: 'Saved!', status: 'success', timeout: 5000 });
    type AlertApi = {
        alert$(): Observable<AlertMessage>;
        post(alert: AlertMessage): void;
    }

    Implemented by

    Index

    Methods

    Methods

    post