components

Tailwind CSS Card

Cards organize and present content for easy reading and understanding.

Class Name
Type
Description
cardComponentContainer element.
card-headerComponentContainer for header.
card-titleComponentTitle of card.
card-bodyComponentContainer for content.
card-actionsComponentContainer for buttons and links.
card-footerComponentContainer for footer.
card-groupComponentContainer for card groups.
image-fullModifierThe image in ‘figure’ element will be the background.
card-compactResponsiveApplies smaller padding.
card-sideResponsiveThe image in ‘figure’ will be on to the side.

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.

Default card size.

Apply the card-compact modifier class to the card to manage the padding of card-header , card-body and
card-footer.

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 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.