Getting Started
Overview
Installation
Theme
Forms
Basic Inputs
Custom Inputs
Select
Components
Components
78
Micro Charts
Navigation
Libraries
Content Editor
Data View
Form Builder
Image Designer
Kanban Board
PDF Viewer
Video Player
Latest npm version of @ngstarter-ui/componentsWeekly npm downloads of @ngstarter-ui/components
Buy License

Alert

The Alert component shows an inline message inside the page. Use it to give users contextual feedback about a state, result, warning, or problem near the part of the interface where it matters.

Use it for:
  • Contextual feedback: Show messages inside forms, tables, cards, settings pages, or workflows.
  • Status messages: Communicate success, information, warnings, notices, or errors.
  • Optional structure: Add a title, icon, close button, auto-close behavior, or small actions.
  • Semantic variants: Use variants such as default, positive, informative, negative, notice, or secondary.

Do not use Alert for temporary toast messages, modal confirmations, critical required actions, or small status labels inside table rows. Use Snack Bar, Dialog, Action Required, or Badge for those cases.

PropTypeDefault
autoClose
Number of milliseconds to auto-close
number
bordered
Bordered variant of an alert
booleanfalse
variant
Colored variant of an alert
AlertVariant | stringdefault
EventDescription
closedExecuted when the alert closes

ngsAlertIcon directive - adds an icon to an alert.

ngs-alert-title component - adds an title/heading to an alert.

ngsAlertAction directive - adds a some control to an alert.

ngsAlertClose directive - adds an event that closes the alert.