Alert
Show operation results or information that needs attention within a page.
Basic usage
Use title for the message and description for additional details.
A new version is available
Refresh the page to use it.
basic.tsx
Examples
Feedback types
Use type for information, success, warning or danger messages. Use danger in new code; error remains a compatibility alias.
Information
A new version is available
Success
Project saved
Warning
Storage is almost full
Danger
Save failed. Try again later.
types.tsx
Trailing content
Use extra for buttons, links or other elements on the right. It can be combined with closable and appears before the close button.
Your draft is saved
extra.tsx
Dismissible alerts
Set closable to show a close button. Remount the alert to show it again after dismissal; this example changes its key.
Your draft is saved
closable.tsx
Icons
Replace the icon with icon, or hide it with showIcon={false}.
Custom icon
Access permissions updated
Hidden icon
Access permissions updated
icons.tsx
API
Alert API
Configuration for alert content, feedback type and dismissal.