Alert Component

The Alert in web design is a highlighted box that grabs attention, often used for brief messages or important information.

Installation

Ensure that have the @zyxui library installed in your project:

If you haven't install and setup @zyxui before please follow the installation guide

Basic Alert

To create a basic alert, you can simple use it like example in below:


Customization

We allow you to customize your Alert component as you want. Here are some of props that allow you to make customization on the Alert component.

Colors

Our Alert component offers many colors, such as default, error, warning, and success.




Variants

You can also modify Alert styles using variant prop, with those options: solid, bordered, flat, shadow, and gradient.





Radiuses

You can customize the border-radius of your Alert component with radius prop with these options: sm, md, lg, circle, and none.






API Reference

For an in-depth exploration of available props and advanced usage, consult the Alert component's API reference:

PropertyDescriptionTypeDefault
iconTo add icon for alert.ReactNodenull
titleAlert title.ReactNodenull
descriptionAlert description.ReactNodenull
classNameAdding custom class names to your alert.stringundefined
colorCustomize alert color styles.default | error | warning | successdefault
variantChange alert base styles.solid | bordered | flat | shadow | gradientsolid
radiusChange alert border radius style.sm | md | lg | circle | nonemd
directionChange alert flex-direction.row | columnrow