The following props are available for button component. These are the custom props that come with we've added for the alert component and you can use all the other native props as well.
Attribute | Type | Description | Default |
---|---|---|---|
variant | Variant | Change alert variant | filled |
color | Color | Change alert color | blue |
dismissible | Dismissible | Makes alert dismissible | undefined |
animate | Animate | Change alert animation | undefined |
show | boolean | Change alert visibility | true |
icon | node | Add icon at the beginning of alert | undefined |
className | string | Add custom className for alert | '' |
children | node | Add content for alert | No default value it's a required prop. |
import type { AlertProps } from "@material-tailwind/react";
type variant = "filled" | "gradient";
type color =
| "blue-gray"
| "gray"
| "brown"
| "deep-orange"
| "orange"
| "amber"
| "yellow"
| "lime"
| "light-green"
| "green"
| "teal"
| "cyan"
| "light-blue"
| "blue"
| "indigo"
| "deep-purple"
| "purple"
| "pink"
| "red";
type dismissible = {
action?: ReactNode;
onClose: () => void;
};
type animate = {
mount?: object;
unmount?: object;
};