Alert - Keep React

The Alert component in the Keep React allows you to display important messages, notifications, or warnings to users. With customizable options for style, close icon, border, and state, you can create visually appealing and informative alerts that align with your design requirements.

Table of Contents#

Default Alert#

The Default Alert is a clean and simple design, ideal for conveying straightforward notifications without any elaborate visuals.

Alert here

Learn More

Color Variants of Alerts#

Colors can convey the nature of alerts. While the default color is primary, you can choose from secondary, success, warning, or error. Simply set the color prop accordingly.

Alert here

Learn More

Alert here

Learn More

Alert here

Learn More

Alert here

Learn More

Alert here

Learn More

Alert With Background Color#

Switch the background color of alerts using the withBg={true} prop. By default, withBg is set to false.

Alert here

Learn More

Alert here

Learn More

Alert here

Learn More

Alert here

Learn More

Alert here

Learn More

Alert With Card#

Display the alert message with a card view, and access all the available props for customization.

Alert here

A short description followed by two actions items.

Alert here

A short description followed by two actions items.

Alert here

A short description followed by two actions items.

Alert here

A short description followed by two actions items.

Alert here

A short description followed by two actions items.

Dismissible Alerts#

Dismiss alert messages by using the dismiss prop. The default behavior is server-side rendering. If you want to use a click event handler, set the alert as a client-side component.

Alert here

Learn More

API Reference#

Explore the available props for the Alert component

PropertyDescriptionTypeDefault
colorThe color variant of the alert.
primary
secondary
success
warning
error
primary
dismissEnables or disables the dismiss icon.booleanfalse
withBgEnables background color.booleanfalse
classNameInjects the class namestringNone

Dismiss Button API Reference#

Explore the available props for the <Alert.Dismiss/> component

PropertyDescriptionTypeDefault
onClickHandler function to be called when the dismiss icon is clicked.function() => void
classNameInjects the class namestringNone