Constructor
Creates a new alert with only a title.
Creates a new alert with title and description.
Methods
Sets a custom icon for the alert.
Sets an icon using the JIcon enumeration.
Makes the alert dismissible with a close button.
Adds custom CSS style classes to the alert.
Usage Example
Common Alert Variants
Use theaddClass() method with these common variants:
.alert-primary- Primary alert style.alert-success- Success message (green).alert-danger- Error or critical warning (red).alert-warning- Warning message (yellow/orange).alert-info- Informational message (blue).alert-secondary- Secondary style (gray)
Style Classes
.alert- Main container.alert-icon-container- Icon container.alert-icon- Icon element.alert-title- Title label.alert-description- Description label.alert-dismiss-container- Dismiss button container.alert-dismiss-btn- Dismiss button.alert-close-icon- Close icon SVG