Alert

Alerts are used to feedback to the user action or system activity.

Basic

Basic usage of alert.

Icon

Display icon within alert.

CustomIcon

Icon can be replaced by setting own icon to customIcon prop.

Type

Change the status of the alerts by passing the type prop. Alert supports info, success, warning, and danger types.

Title

Alert also can have a title by input a string to title prop.

Closable

Turn closable prop to true to display close button which allow user dismiss alert.

API

Alert
PropDescriptionTypeDefault
titleAlert titleReactNode | string-
showIconDisplay icon based on typebooleanfalse
customIconReplace default icon to custom iconReactNode-
typeThe status of the alert'info' | 'warning' | 'success' | 'danger''warning'
closableDisplay close buttonbooleanfalse
customCloseReplace default closeReactNode | string-
rounded-smWhether the Alert have round border radiusbooleantrue
onCloseCallback when Alert is closed(e: MouseEvent) => void-
triggerByToastidentifier for toast trigger (for toast purpose)booleanfalse
durationInterval of dismiss (for toast purpose)2000number