logo

SINGULARITY

DOCS

PurchaseReturn to the Dashboard
Reference

Card

Cards present content and actions focused on a single topic.

Introduction

Cards serve as surfaces that showcase content and actions related to a single subject. The Material UI Card component includes various utility components to support diverse use cases:
  • Card: a container at the surface level for grouping related components.
  • Card Content: the container for the Card’s main content.
  • Card Header: an optional container for the Card’s header section.
  • Card Media: an optional container for displaying media such as images or videos.
  • Card Actions: an optional container for grouping a set of buttons.
  • Card Action Area: an optional container enabling interaction with a designated area of the Card.

Word of the Day

benevolent

adjective

well meaning and kindly.
"a benevolent smile"

Basics

import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
:::success While cards can support multiple actions, controls, and overflow menus, exercise caution to ensure cards remain entry points to more detailed and complex information. :::

Outlined Card

Use variant="outlined" to display a card with an outlined style.

Word of the Day

benevolent

adjective

well meaning and kindly.
"a benevolent smile"

Complex Interaction

On desktop, card content can be expanded. (Click the downward chevron to reveal the recipe.)
R
Shrimp and Chorizo PaellaSeptember 14, 2016
Paella dish

This impressive paella is a perfect party dish and a fun meal to cook together with your guests. Add 1 cup of frozen peas along with the mussels, if you like.

Media

This example demonstrates a card using an image to enhance its content.
Lizard

Lizards are a widespread group of squamate reptiles, with over 6,000 species, ranging across all continents except Antarctica

By default, a <div> element with a background image is used to display media. This approach may pose challenges in some cases, such as when displaying videos or responsive images. For these scenarios, utilize the component prop:
green iguana
Lizard

Lizards are a widespread group of squamate reptiles, with over 6,000 species, ranging across all continents except Antarctica

Primary action

Cards often allow users to interact with their entire surface to trigger a primary action, such as expanding content, navigating to another screen, or performing another function. This action area can be defined by wrapping the card’s contents in a CardActionArea component.
Cards can also include supplemental actions, which should be distinctly separated from the primary action area to prevent event conflicts.

UI Controls

Supplemental actions in a card are clearly indicated using icons, text, or UI controls, typically positioned at the bottom of the card.
This example showcases a media control card.
Live From Space
Mac Miller
Live from space album cover

Active state styles

To customize a Card’s appearance in its active state, add a data-active attribute to the Card Action Area component and apply styles using the &[data-active] selector, as demonstrated below:
🎨 For inspiration, explore MUI Treasury's customization examples.