Logo

Alert

Contextual feedback blocks for status, caution, and system messaging.

Preview

Usage

TS

import { FrAlertModule } from '@frame-ui-ng/components/alert';

HTML

<section frAlert [variant]="'info'">
  <ng-icon frAlertIcon name="tablerInfoCircle" />
  <h3 frAlertTitle>Scheduled maintenance tonight</h3>
  <p frAlertDescription>
    Dashboard exports will be briefly unavailable from 23:00 to 23:30 while reporting infrastructure is upgraded.
  </p>
</section>

Examples

Basic

A straightforward informational alert with a title, description, and leading icon.

Variants

Switch the variant input to match the tone of the message, from neutral guidance to confirmation, caution, or destructive states.

Supporting content

Additional non-title content stays in the message column, which makes room for short follow-up guidance beneath the main description.

Custom Styling

Override alert tokens on a wrapper when a specific workflow needs a branded surface or denser spacing, while leaving the base component API unchanged.

Token Inspector

Hover the icon, container, title, or description to inspect which alert tokens define spacing, type, and semantic surfaces. Click a region to pin the inspector while you review the current values.

Design Tokens

Use these CSS custom properties to tune alert surfaces, spacing, icon sizing, semantic variants, and text styles without changing the markup structure.

SCSS


  --frame-alert-root-bg: var(--frame-surface);
  --frame-alert-root-border: var(--frame-border);
  --frame-alert-root-color: var(--frame-surface-foreground);
  --frame-alert-root-radius: var(--frame-radius-md);
  --frame-alert-root-padding-y: 1rem;
  --frame-alert-root-padding-x: 1rem;
  --frame-alert-root-gap: 0.75rem;
  --frame-alert-root-icon-size: 1rem;
  --frame-alert-root-shadow: none;
  --frame-alert-root-destructive-bg: color-mix(in srgb, var(--frame-destructive) 10%, var(--frame-surface));
  --frame-alert-root-destructive-border: color-mix(in srgb, var(--frame-destructive) 28%, var(--frame-border));
  --frame-alert-root-destructive-color: var(--frame-surface-foreground);
  --frame-alert-root-success-bg: color-mix(in srgb, #16a34a 10%, var(--frame-surface));
  --frame-alert-root-success-border: color-mix(in srgb, #16a34a 28%, var(--frame-border));
  --frame-alert-root-success-color: var(--frame-surface-foreground);
  --frame-alert-root-danger-bg: color-mix(in srgb, #d97706 10%, var(--frame-surface));
  --frame-alert-root-danger-border: color-mix(in srgb, #d97706 30%, var(--frame-border));
  --frame-alert-root-danger-color: var(--frame-surface-foreground);
  --frame-alert-root-info-bg: color-mix(in srgb, #2563eb 10%, var(--frame-surface));
  --frame-alert-root-info-border: color-mix(in srgb, #2563eb 28%, var(--frame-border));
  --frame-alert-root-info-color: var(--frame-surface-foreground);
  --frame-alert-title-font-size: 0.9375rem;
  --frame-alert-title-font-weight: 600;
  --frame-alert-description-color: var(--frame-muted-foreground);
  --frame-alert-description-font-size: 0.875rem;
  --frame-alert-description-line-height: 1.5;