components

Tailwind CSS Card

Cards organize and present content for easy reading and understanding.

Class Name
Type
Description
cardComponentContainer element.
card-groupComponentContainer for card groups.
card-headerPartHeader part (content)
card-titlePartTitle of card.
card-bodyPartBody part (content)
card-actionsPartActions part (buttons, etc.)
card-footerPartContainer for footer.
card-borderStyleAdds border to
card-xsSizeThe card will be extra small in size.
card-smSizeThe card will be small in size.
card-mdSizeThe card will be medium(default) in size.
card-lgSizeThe card will be large in size.
card-xlSizeThe card will be extra large in size.
card-sideModifierThe image in ‘figure’ will be on to the side.
image-fullModifierThe image in ‘figure’ element will be the background.

A fundamental card includes a title, content, and an additional action content.Cards initially have no predefined width, thus they inherit a 100% width by default unless specified otherwise.

Check out our card component which Utilize card component class.

Card sizes with card-{xs|sm|md|lg|xl} utility classes.

Simple body example with text.

Example showcasing an image card with content.

Buttons and links placed within card-actions can be referred to as actions.

With component class card-header you can specify the styling and content for the header sections of a card element in your web application.

With component class card-footer, you can specify the styling and content for the footer sections of a card element in your web application.

Create a simple list displayed within a card-like interface. Utilize the Divide utility class to add borders between the list items.

The image’s positioning in the card is determined by the placement of the figure element. When the figure element is the first child, the image will be positioned at the top; conversely, if it is the last child, the image will be positioned at the bottom.

Image at top

Or image at bottom

By utilizing the image-full modifier class, the image expands to occupy the entire width and is employed as an overlay.

Apply the glass modifier class to the card component class to impart a glass effect onto the card.

The card-side class positions images responsively, with options for left or right placement based on breakpoints like sm, md, and lg.

Utilize the card-group class to establish a container for organizing cards into a cohesive group.

Implement a hover effect on the card image that animates a zoom-out transition.

Apply a hover animation to the card image that translates it upwards.

Basic tabs in card example.

Feel free to apply this variation to all our semantic color utility classes or Tailwind colors.

By default, text is aligned left. You can modify the alignment using utility classes such as text-center or text-right.

You can use card-border for bordered card.

You can use alert inside card.

Show an empty state placeholder when no data is available, providing friendly tips for users.

Required FlyonUI JS

Utilize the data-remove-element attribute to specify the connected ID for card removal. Customize the removal animation by incorporating the removing: modifier, as illustrated below.