# Card: The Reusable Box That Groups One Subject's Content and Actions

> Learn the parts, variants, states, and clickable rules that let teams build one card the same way everywhere, with keyboard and mouse users both in mind.

**In short:** A card is a reusable box that groups content and actions about one subject, built with set parts, variants and states and handled for both keyboard and mouse users.

From "Design systems", a free course by Venkat R. Murty: https://designervenkat.online/learn/design-systems/card

## What you will learn

A card is a small, self-contained box that groups content and actions about one subject. You see cards on shop sites, news pages, and phone apps. In a design system, the card is built once, with clear parts, versions, and rules, so every team builds it the same way. This lesson covers the parts of a card, its common versions, when to use it, how it behaves in different states and screen widths, and how to make a clickable card work for mouse users and keyboard users alike. It ends with a worked example and a short quiz.

- **Design system:** A shared set of parts and rules that teams use so their products look and work alike.
- **Component:** One reusable piece of a design system, such as a button, a field, or a card.
- **Slot:** A named spot inside a component where a certain kind of content goes.
- **Variant:** A version of the same component with a different look or purpose.
- **State:** How a part looks at a given moment, such as when a mouse is over it or when it cannot be used.
- **Keyboard focus:** The visible marker that shows which item will act next when someone moves with the Tab key or presses Enter.
- **Nested:** Placed inside something else. A button inside a link is nested.

## What is a card?

The Material Design guidelines describe a card as a place that shows content and actions about a single subject. Cards display content and actions about a single subject, and that single focus is the main idea to hold onto. A card is not a page. It is a unit that someone can read in one glance and act on without leaving the page.

Queensland's government design system uses the card for a brief summary of content or a task, often with a link to more detail. That is the common job of a card: give enough to decide, then send the person further if they want more.

## What are the parts of a card?

Designers often describe a card as a stack of named parts. The names below are common across design systems, so you will meet them again in other teams' work.

- **Container:** The outer box that holds every other part. Its size comes from what sits inside it, and its shadow or border shows how far it sits from the page.
- **Media:** An optional picture at the top, such as a photo, a logo, or an icon. Teams often fix one shape, such as a square or a wide rectangle, so every picture in a set matches.
- **Header:** The title area, usually with a short headline and sometimes a small label or avatar. Teams usually place the name and title here, leaving actions for the bottom edge.
- **Body:** The text part. It holds a short description or a few details about the same subject, and it can be left out when the title says enough.
- **Footer and actions:** The bottom strip for buttons, links, or plain text. PatternFly lists external links, actions, or static text as things a footer can hold.

The GC system marks the badge, image and description as optional, but not the headline, which it describes as a required title. Fluent 2, the design system from Microsoft, treats every slot in its card as optional, so a team can build a plain card with only a header or a card with a picture and a button. The rule for which slots are required should be written down, not left to each builder.

> **Tip:** Make a short table for your system. List each slot, say whether it is required or optional, and describe what content it accepts. Builders then stop guessing, and reviewers can check a card against the table.

## What are the card variants?

A variant is a version of the same card with a different look. The rules for content stay the same, but the style of the container changes. Material Design 3 lists three common variants.

- **Elevated:** A drop shadow lifts the card off the background. It separates the card more than a filled card does, but less than an outlined card.
- **Filled:** A solid surface colour sets the card apart with subtle separation. It has less emphasis than the other two, so it suits calm pages.
- **Outlined:** A thin border goes around the container. It can give the card more emphasis than the other types, and it works well on flat backgrounds.

That is a useful rule for a team: pick one variant for the product and do not mix three styles on one page.

Layout is a second kind of variation. A card can stack its parts from top to bottom, or place them side by side.

Fluent 2 explains that a card can be aligned vertically or horizontally. A vertical card stacks a header, a body, and a footer. A horizontal card puts its header and body from left to right, which suits a thumbnail beside a short text.

Clickable and selectable cards are a third kind of variant. PatternFly explains that a clickable card makes its whole body respond to a click, while a card that is both selectable and clickable changes what a click means, as the next part explains.

## When should you use a card?

A card works best when content comes as a set of separate, similar items. The U.S. Web Design System says that an individual card is typically a member of a collection of similar cards, not a single card standing alone. If you have only one fact to show, a card may be too much box for it.

A card should carry content, not decoration. If you put a border around plain text to make it look finished, a simpler layout is usually better.

Choosing between a card, a list, and a plain layout is a decision a designer makes often with this part.

- **Use a card:** When you show several related items that each need a picture, a short summary, or a button, and people scan and pick one of them.
- **Use a list:** When readers move from one item to the next and compare lines of text.
- **Use a plain layout:** When one topic needs only headings, spacing, and a divider. Material Design says not to force content into cards when spacing, headlines, or dividers would make a simpler hierarchy.

## How do you group content and actions?

Once you decide a card is right, the next job is to group what goes inside it. Good grouping makes the card easy to scan, so the reader knows what it is about in a second.

1. **Keep one subject:** Each card should be about one thing, such as one product or one event.
2. **Order by importance:** Put the most useful content at the top. Material Design recommends placing the primary content first or using type size to create emphasis. The title should look clearly bigger than the description.
3. **Place actions at the bottom:** Fluent 2 gives a simple example: names and titles go in the header, and actions go in the footer. A reader then reads the content first and decides what to do second.
4. **Keep a set consistent:** Give every card in one row the same parts. If one card has a picture and another has none, the row looks uneven, so the picture slot should be used in all cards or in none.
5. **Leave things out:** Material Design advises against loading cards with extra facts and extra buttons. If a detail does not help the main subject, move it to the next page.

## One primary action per card

A card can hold more than one button, but it should have one main job. That main job is the primary action: the thing most people came to do, such as opening a product or starting a booking. Any other button is secondary, such as saving an item for later or sharing it with a friend.

The reader then has one main path and one side path, with no confusion about which is which.

> **Tip:** Before you draw a card, say its primary action in one short phrase, such as 'open the product'. If you cannot do that, the card is trying to do too much, so split the content or remove a button.

## States of a card

A state is how a part looks at a given moment. A card needs a clear look for each state, and so does every button inside it. The five states below are the ones a team should design and write down.

- **Default:** The resting look before anyone touches the card.
- **Hover:** The look when a mouse pointer is over the card. A small lift in the shadow or a change of surface colour tells the reader the card can be clicked. Hover is only for mouse users, so it must never be the only clue.
- **Focus:** The look when a keyboard user has moved to the card or a button. Accessibility guidance says the focus of active elements must be visible, and that includes the card itself. A clear outline is the usual answer.
- **Pressed:** The brief moment when someone presses or taps the card. A small change in colour or depth shows that the press landed. Teams choose the exact look for their own system.
- **Disabled:** The look for a card or button that cannot be used right now. It looks muted and does not respond. If the reason is not obvious, add a short note near it.

> **Tip:** Test every state on the whole card and on each button inside it. Designers who check only the hover look often miss the focus outline, which is the state keyboard users depend on.

## How cards respond to screen width

A card has to fit a phone, a tablet, and a wide desktop. The Government of Canada design system gives a simple grid rule: on desktop, use two or three cards per row, and on mobile, use one card per row.

The shape can change too.

Some systems change the layout itself. The U.S. system has a horizontal card style that turns on at a set width, so the picture sits beside the text on a wide screen and above it on a narrow one.

On a small screen with no mouse, that shadow is a clue people rely on.

> **Tip:** Test your card at the narrowest width your product supports. Long titles and long button labels usually break first, so write the longest real title into your test.

## Making a card clickable without breaking keyboard use

Teams often want the whole card to open the item. There are safe ways to do that and one unsafe way. The whole card can work as a single link when there is one obvious action. Accessibility writers say that this is bad for screen reader users and makes it hard to place other controls inside the card.

The safer method is to link only the main title, then stretch that link's clickable area so it covers the whole card. A mouse user can click anywhere on the card, and a screen reader user hears the title as the link, not every line of text on the card.

1. **Choose one main link:** Make the title the link. Inclusive Components notes that a unique, descriptive link label helps people who scan lists of links.
2. **Stretch the link:** Extend the link's clickable area over the card. The short link name stays the same, and the whole card still responds to a mouse.
3. **Lift the buttons above the stretch:** Put Save, Share, or other buttons in a higher layer, so a click lands on the button and not on the card. Designers then describe those buttons as sitting above the card's link.
4. **Leave empty space around small buttons:** One tester found that dead space around a button prevents mis-taps. If possible, make room for the extra control rather than placing it on top of the link.
5. **Show focus clearly:** Keyboard users need to see which element is active. Make the focus outline visible on the card, the title link, and each button.
6. **Test with the keyboard:** A clickable card should work for people who do not use a mouse. Move through the card with the Tab key and press Enter on each item to confirm it does what its label says.

Why can buttons not sit inside a link? A link cannot contain another link, and the same problem appears with buttons inside a link. Nested controls also make the accessible name confusing, so a screen reader can read out a muddled description. Icon buttons with no written name are a common failure, because a screen reader only announces the word button.

## Worked example: a shop product card

This example follows one product card from a shop. It has a photo, a product name, a short description, a price, and two buttons, Save and Share. The main goal is to open the product page. The steps show how the team builds the card and checks it.

1. **Name the subject:** The card is about one product. The photo, name, price, and rating all describe that product, and nothing else.
2. **Fill the slots:** The media slot holds the product photo. The header holds the product name. The body holds the price and a short description. The footer holds the Save and Share buttons.
3. **Set the primary action:** The product name is the link. Its clickable area is stretched over the whole card, so tapping the photo or the price also opens the product page.
4. **Lift and space the secondary buttons:** Save and Share sit above the stretched link, with empty space around them. A tap on either button saves or shares, and it does not open the page.
5. **Label each button clearly:** Name the buttons 'Save product' and 'Share product'. A screen reader then announces the link and the two buttons with clear names, not just the word button.
6. **Check the keyboard path:** Tab moves from the product name to Save, then to Share. Each one shows a visible focus outline. Pressing Enter on the name opens the product, and Enter on Save saves it without leaving the card.
7. **Check the screen width:** On a phone, the card sits alone in its row. On a wide screen, it sits in a row of two or three cards, and every card in that row has the same parts.

## Check your understanding

**Quick check:** A teammate builds a product card where the whole card is a link. They then add a Save button and a Share button inside the card. What is the best structure for mouse and keyboard users?

A. Nothing is wrong, because buttons inside a link work the same way for every user.
B. Only mouse users are affected, because keyboard users can still reach every button with the Tab key.
C. Keep the link on the product name, stretch it over the card, and lift Save and Share above it with clear labels and visible focus.
D. Remove the link entirely and make the card a plain box, so the buttons have no conflict to solve.

**Answer:** C. Buttons inside a whole-card link create nested controls, which confuse screen readers and can send a tap on Save to the product page. Keeping one link on the title, stretching it, and lifting the buttons above it gives both kinds of user a clear path.

**Quick check:** A support team must show 60 tickets. Each ticket has a date, a status, and an owner. Readers compare the status and owner across many rows to find the urgent ones. Which layout fits best?

A. A card for each ticket, because cards always look more polished than rows.
B. A list or plain layout, because readers compare items line by line and a card is meant for a standalone item.
C. An outlined card with a button on every ticket, so each one can be opened quickly.
D. A filled card with a shadow, so the urgent tickets stand out from the rest.

**Answer:** B. Cards suit a set of separate items that each carry a short summary. When the reader moves from one item to the next and compares lines, a list or plain layout is easier, and the card's extra space only slows that comparison.

## Key takeaways

A card is a reusable container that groups content and actions about one subject. A design system defines its parts, its variants, and its states once, so teams build it the same way. Use a card for a set of separate items, not for every bordered box. Keep one primary action per card, and let the main link cover the card while small buttons sit above it. Check each state, including focus, and test the card at the narrowest width your product supports.

## Sources

- [Material Design 3 Cards guidelines](https://m3.material.io/components/cards/guidelines)
- [Material Design Cards (version 2 site)](https://m2.material.io/components/cards)
- [Fluent 2 Design System, React Card usage](https://fluent2.microsoft.design/components/web/react/core/card/usage)
- [GC Design System (Canada), Card design](https://design-system.canada.ca/en/components/card/design/)
- [U.S. Web Design System (USWDS), Card](https://designsystem.digital.gov/components/card/)
- [Queensland Government Design System, Cards](https://www.designsystem.qld.gov.au/components/card)
- [PatternFly, Card design guidelines](https://www.patternfly.org/components/card/design-guidelines/)
- [Material Design 1 Cards (MDUI)](https://www.mdui.org/en/design/1/components/cards.html)
- [Accessible cards by design (Chiara Cielo, Medium)](https://medium.com/@chiaracielo/accessible-cards-by-design-4741e2158bb4)
- [Cards: Accessible Examples and WCAG Best Practices](https://a11y-examples.com/examples/cards/)
- [Accessible Cards (Kitty Giraudel)](https://github.com/KittyGiraudel/site/blob/main/posts/2022-04-02-accessible-cards.md)
- [The Brutally Honest Guide to Building Better Cards](https://www.webbae.net/posts/the-brutally-honest-guide-to-building-better-cards)
- [Make Entire Div Clickable (Position Is Everything)](https://www.positioniseverything.net/make-entire-div-clickable/)
- [Inclusive Components: Cards](https://inclusive-components.design/cards/)
- [UI Card Design: Examples, Best Practices and Common Patterns (Stan)](https://www.stan.vision/journal/ui-card-design-examples-best-practices-and-common-patterns)
