Tailwind CSS Card - Props



Card Props

The following props are available for card component. These are the custom props that come with we've added for the card component and you can use all the other native props as well.

AttributeTypeDescriptionDefault
variantVariantChange card variantfilled
colorColorChange card colorwhite
shadowbooleanAdd box-shadow for cardtrue
classNamestringAdd custom className for card''
childrennodeAdd content for cardNo default value it's a required prop.


For TypeScript Only

import type { CardProps } from "@material-tailwind/react";

Card Header Props

The following props are available for card header component. These are the custom props that come with we've added for the card header component and you can use all the other native props as well.

AttributeTypeDescriptionDefault
variantVariantChange card header variantfilled
colorColorChange card header colorwhite
shadowbooleanAdd box-shadow for card headertrue
floatedbooleanMakes card header floatedtrue
classNamestringAdd custom className for card header''
childrennodeAdd content for card headerNo default value it's a required prop.


For TypeScript Only

import type { CardHeaderProps } from "@material-tailwind/react";

Card Body Props

The following props are available for card body component. These are the custom props that come with we've added for the card body component and you can use all the other native props as well.

AttributeTypeDescriptionDefault
classNamestringAdd custom className for card body''
childrennodeAdd content for card bodyNo default value it's a required prop.


For TypeScript Only

import type { CardBodyProps } from "@material-tailwind/react";

Card Footer Props

The following props are available for card footer component. These are the custom props that come with we've added for the card footer component and you can use all the other native props as well.

AttributeTypeDescriptionDefault
dividerbooleanAdd border-top for card footerfalse
classNamestringAdd custom className for card footer''
childrennodeAdd content for card footerNo default value it's a required prop.


For TypeScript Only

import type { CardFooterProps } from "@material-tailwind/react";

Types - Variant

type variant = "filled" | "gradient";

Types - Color

type color =
  | "transparent"
  | "white"
  | "blue-gray"
  | "gray"
  | "brown"
  | "deep-orange"
  | "orange"
  | "amber"
  | "yellow"
  | "lime"
  | "light-green"
  | "green"
  | "teal"
  | "cyan"
  | "light-blue"
  | "blue"
  | "indigo"
  | "deep-purple"
  | "purple"
  | "pink"
  | "red";
Edit this page on Github