Skip to content

Alert

Displays a styled message box with a variant indicator. Use alerts for informational notices, success confirmations, warnings, or error messages.

Properties

PropertyTypeDefaultDescription
contenttextarea'Alert message'The alert message text. Supports expressions and multi-line content.
variantselect'info'The alert style. One of: info, success, warning, error.

Variants

VariantUse Case
infoGeneral information, tips, neutral notices
successConfirmation of completed actions
warningCaution, potential issues, deprecation notices
errorErrors, failures, critical problems

Example

A static informational alert:

Content: This feature is in beta. Please report any issues.
Variant: info

A 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 content and variant to 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).