Skip to content

Notification

Notification cards in the top-right corner, supporting title, description, duration, and type.

Basic usage

Four types

InfoSuccessWarningError

Custom duration

Custom duration

8sNo auto-close

With progress bar

With progress bar

Progress bar (bottom)Progress bar (top)

Scrollable long content

Scrollable long content

Long content

Clear all

Clear all

Fire threeClear all

API

Attributes

AttributeDescriptionTypeDefault
descriptionDescription contentstring
durationAuto-close duration in ms; pass 0 to keep it openstring4500
progress-positionProgress bar position: bottom (default) / topstringbottom
scrollableScroll inside the card when the content is too long; enabled by default, pass false to disablestringtrue
show-progressShow the auto-close countdown progress bar (animates in sync with duration)boolean
titleTitle textstring
typeNotification type: info/success/warning/errorstringinfo

Methods

MethodDescription
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
  • duration defaults to 4500ms; pass 0 to keep the notification open.
  • showProgress shows the auto-close countdown progress bar, animating in sync with duration; progressPosition accepts bottom (default) / top.
  • scrollable is enabled by default (scroll inside the card when the content is too long); pass false to disable.
  • Stacked at the top-right, role="region" + aria-label="Notification".

Released under the MIT OR Apache-2.0 License.