Alert

Demo

Props

PropTypeDescription
variant'default' | 'destructive' (optional)The style variant of the alert. Options are 'default' or 'destructive'.
titlestring (optional)The title of the alert.
descriptionstring (optional)The detailed description or message of the alert.
iconReact.ReactNode (optional)A custom icon to display in the alert.
classNames{ root?: string; title?: string; description?: string } (optional)Custom class names for the alert, title, and description components.

Styles

This component allows for custom styles via the classNames prop:

  • root: CSS class for styling the overall Alert component.
  • title: CSS class for styling the title of the alert.
  • description: CSS class for styling the description of the alert.

Functionality

  • The Alert component can be used to draw attention to important information or warnings.
  • Supports customizable titles, descriptions, and icons.
  • Offers two stylistic variants to suit different contexts or severity levels.