Generate and export Tailwind color patterns.
Detailed documentation for the Alert component in the PixelBlockUI library.
The Alert
component is used to display important messages to the user. It supports various types of alerts such as success, error, warning, and info, each with a corresponding icon and color scheme.
You can install the Alert component using the PixelBlock CLI tool.
npx pixelblock-cli add Alert
You can customize the icon for each alert type by passing a React node as the icon
prop.
The Alert
component accepts the following props:
Prop | Type | Description |
---|---|---|
type | 'success' | 'error' | 'warning' | 'info' | The type of alert to display. |
title | string | The title of the alert. |
description | string | The description or message of the alert. |
icon | React.ReactNode | Optional icon to display in the alert. |
onClose | () => void | Optional callback function to handle close action. |
The Alert
component is a versatile and customizable way to display important messages to users. With support for different alert types and custom icons, it can be easily integrated into any React or Next.js project.
For more information and detailed usage instructions, refer to the PixelBlockUI Documentation.