Notification
Notification cards in the top-right corner, supporting title, description, duration, and type.
Basic usage
Four types
Custom duration
Custom duration
With progress bar
With progress bar
Scrollable long content
Scrollable long content
Clear all
Clear all
API
Attributes
| Attribute | Description | Type | Default |
|---|---|---|---|
description | Description content | string | — |
duration | Auto-close duration in ms; pass 0 to keep it open | string | 4500 |
progress-position | Progress bar position: bottom (default) / top | string | bottom |
scrollable | Scroll inside the card when the content is too long; enabled by default, pass false to disable | string | true |
show-progress | Show the auto-close countdown progress bar (animates in sync with duration) | boolean | — |
title | Title text | string | — |
type | Notification type: info/success/warning/error | string | info |
Methods
| Method | Description |
|---|---|
notification.info({ title, description?, duration?, showProgress?, progressPosition?, scrollable? }) | Info notification |
notification.success({ title, description?, duration?, showProgress?, progressPosition?, scrollable? }) | Success notification |
notification.warning({ title, description?, duration?, showProgress?, progressPosition?, scrollable? }) | Warning notification |
notification.error({ title, description?, duration?, showProgress?, progressPosition?, scrollable? }) | Error notification |
destroyAllNotification() | Clear all notifications |
durationdefaults to4500ms; pass0to keep the notification open.showProgressshows the auto-close countdown progress bar, animating in sync withduration;progressPositionacceptsbottom(default) /top.scrollableis enabled by default (scroll inside the card when the content is too long); passfalseto disable.- Stacked at the top-right,
role="region"+aria-label="Notification".