Card
A card groups one thing: a case study, an article, a service. If the whole card is a link, the whole card is the target.
Show code
<a class="card hover-ring-2" href="/case-studies/spotlight-me/">
<h3>Spotlight.me</h3>
<p>From positioning to a tested prototype.</p>
</a> When to use it
- One thing among several of its kind that people choose between: a case study, an article, a service.
- The whole thing is a link to that thing’s page.
Use something else when:
- It is the one panel that asks for action: the feature card,
.sn-card-feature. - It is a message about the page: a notice or a callout.
- You only want a box round a section: leave the box off.
How it works
| Surface | color.surface.raised |
| Border | 1 px color.border.subtle |
| Shadow | shadow.raised |
| Corners | radius.card (14 px) |
| Padding | space.5 to space.6 (20–24 px) |
| Hover and focus (linked cards) | An extra 1 px ember ring drawn with a shadow, so nothing shifts |
Case study cards
On the case studies index, each card leads with its words (sector, title, client) and ends with a small product mockup that runs edge to edge. Reading comes first and the picture confirms it. A subgrid keeps every title, client and mockup on the same line across a row, however long each title is. In print the mockups are left out and the card keeps its words.
A card can carry a short label, such as Current work, set with cardLabel in the case study's details. It sits at the right of the client line, so the line above the title stays clean. Labels don't change the order: that's set in the site settings.
Do and don't
Do
- Use cards for items people compare or choose between
- Keep cards in a row the same structure
Don't
- Put cards inside cards
- Wrap whole page sections in cards just to add a box
Accessibility
What it does for you
- A linked card is one link, so the whole card is one target and one stop for the keyboard.
- The ring that shows on hover shows on keyboard focus too, with the usual 2px outline.
- The heading is inside the link, so the link’s name starts with it.
- On paper a card keeps its edge, drops its shadow and is never split across sheets.
What you need to do
- No links or buttons inside a linked card.
- A heading first, at the level the page’s outline needs.
- Keep what is inside short: all of it is the link’s name.
Keyboard
| Key | What it does |
|---|---|
| Tab | Moves to the card. |
| Enter | Follows it. |
What a screen reader is told
- A link, named by everything in the card, its heading first.
This is what the browser reports to assistive technology. What each screen reader then says varies, and has not been listened to yet.
WCAG 2.2
| Criterion | Level | How this meets it |
|---|---|---|
| 1.4.11 Non-text Contrast | AA | The focus outline has at least 3:1 against the page, in light and dark. |
| 2.4.4 Link Purpose (In Context) | A | The name starts with the card’s heading. |
| 2.4.7 Focus Visible | AA | A 2px outline as well as the ring. |
| 2.5.8 Target Size (Minimum) | AA | The whole card is the target. |
| 4.1.2 Name, Role, Value | A | One link; nothing interactive nested in it. |
The criteria this component has a part in. A page that uses it still has to meet the rest.
Checked
| Check | How | Result |
|---|---|---|
| Automated (axe-core) | WCAG 2.0, 2.1 and 2.2 rules at A and AA, the page in light and in dark | Passed Nothing found, light or dark |
| Narrow screen | No sideways scrolling at 320px wide (WCAG 1.4.10) | Passed No sideways scrolling |
| Keyboard and what the browser reports | Real key presses on the live example, and the role, name and state given to assistive technology | Passed 5 of 5 checks pass |
| On paper | Somnia’s print check: no overlaps, stranded headings or controls on the page | Passed No faults on 4 sheets |
| Screen reader | Listened to by a person, in VoiceOver and NVDA | Not yet Not yet checked by a person |
The 5 checks made with the keyboard, on the example at the top of this page:
- Passed Tab reaches the card as one stop, and Enter follows it
- Passed It is one link, named by what is in it, its heading first
- Passed Nothing inside it is a link or a button
- Passed Keyboard focus shows a 2px outline as well as the ring
- Passed The outline has at least 3:1 against the page, in light and dark
Run by script on against Somnia DS 1.89.0, in Chromium with axe-core 4.14.0. How these checks work, and every component's results.
Not yet checked
- How it sounds in a screen reader (VoiceOver, NVDA, TalkBack) has not been checked by a person. The roles, names and states the browser reports are checked by script; what is actually spoken is not.
- Windows high contrast (forced colours) has not been looked at by a person.
- A linked card’s name is all its words. On a card with a lot in it, such as a case study card, that is long to listen to. Not tested with people.
Evidence
Where it's used
| Where | For |
|---|---|
| mediadreams.co.uk | The home page, Services, and the Case studies and Insights lists. |
| Headland Yachting | Article lists. |
What we saw, and what changed
| When | What we saw | What changed |
|---|---|---|
| Cards side by side in a row came out different heights. | .sn-tiles: a grid whose cards in a row are one height (1.59.0). | |
| The one panel that asks for action beside an article was an inverted panel. | .sn-card-feature: the page’s own colours with an accent tint and edge (1.65.0). |
From building and using it on real sites, each entry taken from the changelog or the build's own notes. This is observation by the studio and its clients, not research sessions with users.
What we don't know yet
- Whether people expect the whole card to be the link, or look for a link inside it, has not been tested.