Appearance
Alert
Displays a styled message box with a variant indicator. Use alerts for informational notices, success confirmations, warnings, or error messages.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| content | textarea | 'Alert message' | The alert message text. Supports expressions and multi-line content. |
| variant | select | 'info' | The alert style. One of: info, success, warning, error. |
Variants
| Variant | Use Case |
|---|---|
info | General information, tips, neutral notices |
success | Confirmation of completed actions |
warning | Caution, potential issues, deprecation notices |
error | Errors, failures, critical problems |
Example
A static informational alert:
Content: This feature is in beta. Please report any issues.
Variant: infoA dynamic alert based on data:
Content: `{ {if(row.stock < 5, 'Low stock! Only ' + row.stock + ' remaining.', 'In stock')}}`
Variant: `{ {if(row.stock < 5, 'warning', 'success')}}`Tips
- Use expressions in both
contentandvariantto make alerts dynamic. - Combine with the visibility system to show alerts only under certain conditions (e.g., show a warning only when stock is low).
- Each variant renders with a distinct color scheme (blue for info, green for success, yellow for warning, red for error).