Skip to content

Props/Options

All the available options or props that you can set while opening the notification.

PropertyRequiredTypeDescription
titleoptional Required if not passing custom componentstringThe title text of the notification
textoptional Required if not passing custom componentstringThe main content/description of the notification
positionoptionalstringThe position where the notification will appear.
Available positions are:-
top-left
top-center
top-right
bottom-left
bottom-center
bottom-right
coloroptional By default the color is black and whitestringThe color theme for the notification. Only needed when using notify helper.
Available colors are:-
primary
secondary
success
warning
danger
dark
info
light
borderstringoptionalBorder color for the notification. Same as the color prop
iconhtmlElement ComponentoptionalIcon to display in the notification
durationnumber booleanoptionalDuration for which the notification is displayed. Set false to disable automatic close functionality
hideCloseButtonoptionalbooleanWhether to hide the close button
flatoptionalbooleanNotification layout flat or not
showProgressoptionalbooleanShow the progress bar or not
stickyoptionalbooleanSticky or not
squareoptionalbooleanSquare or not
widthoptionalstring nullCustom width
noPaddingoptionalbooleanSet default padding or not
customComponentoptionalComponentUse a custom view/page as notification content
closeOnClickoptionalboleanShould close on click inside or not
classNotificationoptionalstringCustom class for the notification item
onClickoptionalanyFunction to call when the notification is clicked
onCloseoptionalanyFunction to call when the notification is closed