Alert
Displays a callout for user attention.
code
Expend code
#Variant
code
Expend code
#Error with button
code
Expend code
Alert
The properties of the Alert component used to display warning or informational messages. The Alert component can contain children such as AlertHeader, AlertTitle, AlertDescription, and AlertButton.
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | Specifies additional CSS classes for the Alert component. |
icon | React.ReactNode | - | Specifies the icon to be displayed on the left side of the Alert. |
children | React.ReactNode | - | The content inside the Alert, which can include components like AlertHeader, AlertTitle, AlertDescription, and AlertButton. |
AlertHeader
The properties of the AlertHeader component which wraps the title and description.
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | Specifies additional CSS classes for the AlertHeader component. |
children | React.ReactNode | - | The content inside the AlertHeader, typically includes AlertTitle and AlertDescription. |
AlertTitle
The properties of the AlertTitle component which represents the title of the Alert.
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | Specifies additional CSS classes for the AlertTitle component. |
children | React.ReactNode | - | The content of the title. |
AlertDescription
The properties of the AlertDescription component which provides additional details about the Alert.
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | Specifies additional CSS classes for the AlertDescription component. |
children | React.ReactNode | - | The content of the description. |
AlertButton
The properties of the AlertButton component, which represents the button inside the Alert.
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | Specifies additional CSS classes for the AlertButton component. |
onClick | () => void | - | The function that is called when the button is clicked. |
children | React.ReactNode | - | The content of the button, typically a text label. |