Alert - Aspect UI

The Alert component is used to display important messages or status updates to users, such as success, warning, error, or informational messages. It supports different variants with corresponding icons and colors, ensuring clear and effective communication. Alerts can be styled, dismissed, or customized for different use cases, including system notifications, form feedback, or contextual messages. Fully accessible and easy to integrate into any UI.

Table of Contents#

Default Alert#


Multiple Type Alert#


Alert Props#


PropTypeDefaultDescription
type'success' 'warning' 'error' 'info'-Specifies the type of alert to display, which determines the style and icon.
childrenReactNode-The content displayed inside the alert.
closeablebooleantrueDetermines whether the alert can be dismissed.
onClose() => void-Callback function invoked when the alert is closed.
classNamestring''Additional CSS classes for the alert container.