Design Tokens
Learn how design tokens power the entire Grundtone system.
Cards are used as a visual boundary around content or interactive elements that belong to the same topic. They can also be used for navigation.
Use cards to group content and functionality that is distinct from the rest of the page.
Keep card text short and precise — avoid long paragraphs.
Ensure cards appear calm in the page layout and do not break the user's natural reading flow. Use the design system's grid to determine card widths. Cards placed side by side should have equal height.
Do not use horizontally placed cards for long lists of content where the user needs to search for something specific (Laubheimer, 2016). Use a vertical layout instead, e.g. with horizontal cards.
Avoid mixing navigation cards (where the entire card is clickable) with other cards in the same list. Users may become confused about what is interactive.
Cards must always have a title and body text. They can also contain:
alt text for images that carry meaning. Purely decorative images must have an empty alt="" so screen readers skip them.| Class | Purpose |
|---|---|
.card | Base flex container with surface background and border-radius |
.card--bordered | Bordered variant — border instead of raised surface |
.card--flat | Flat variant — no background, no border |
.card--nav | Navigation card — entire card is clickable with hover elevation |
.card--horizontal | Horizontal layout — image left, content right |
.card__media | Image wrapper with 16:9 aspect ratio |
.card__content | Content container with padding and flex gap |
.card__subheading | Small uppercase text above the title |
.card__title | Card title (required) |
.card__body | Body text content |
.card__footer | Footer pushed to bottom via margin-top: auto |
.card__arrow | Arrow icon for nav cards |
<article class="card max-w-sm">
<div class="card__media">
<div class="w-full h-full bg-surface-alt"></div>
</div>
<div class="card__content">
<span class="card__subheading">Guide</span>
<h3 class="card__title">Design Tokens</h3>
<div class="card__body">
<p>Learn how design tokens power the entire Grundtone system.</p>
</div>
</div>
</article>Learn how design tokens power the entire Grundtone system.
Navigation cards take the user to another page. The entire card is clickable, indicated by an underlined title and an arrow icon in the bottom-right corner.
If the navigation card links to an external page that opens in a new tab, an external link icon replaces the arrow.
Navigation cards can be used with or without an image.
<a href="#" class="card card--nav max-w-sm">
<div class="card__content">
<span class="card__subheading">Documentation</span>
<h3 class="card__title">Getting Started</h3>
<div class="card__body">
<p>Set up Grundtone in your project in under 5 minutes.</p>
</div>
</div>
</a><article class="card card--bordered max-w-sm">
<div class="card__content">
<h3 class="card__title">Bordered Card</h3>
<div class="card__body">
<p>A card with a subtle border instead of elevation.</p>
</div>
</div>
</article>A card with a subtle border instead of elevation.
<article class="card card--flat max-w-sm">
<div class="card__content">
<h3 class="card__title">Flat Card</h3>
<div class="card__body">
<p>No background, no border — just structure and spacing.</p>
</div>
</div>
</article>No background, no border — just structure and spacing.
Cards can contain buttons and links in the footer. Keep the number of interactive elements low — one or two is ideal (Coyle, 2020).
<article class="card max-w-sm">
<div class="card__media">
<div class="w-full h-full bg-surface-alt"></div>
</div>
<div class="card__content">
<span class="card__subheading">Course</span>
<h3 class="card__title">Introduction to Design Tokens</h3>
<div class="card__body">
<p>Learn the fundamentals of design tokens and how to apply them.</p>
</div>
<div class="card__footer">
<button type="button" class="gt-btn gt-btn--primary gt-btn--sm">Enrol</button>
<a href="#" class="gt-btn gt-btn--outlined gt-btn--sm">Read more</a>
</div>
</div>
</article>Learn the fundamentals of design tokens and how to apply them.
In horizontal cards, the image, text, and arrow icon are arranged in a horizontal layout. These cards are best suited for short text and/or cards that are wider than six grid columns (~500px) on desktop. On mobile, horizontal cards fall back to the standard vertical layout.
Both standard and navigation cards can be horizontal.
<article class="card card--horizontal max-w-xl">
<div class="card__media">
<div class="w-full h-full aspect-video bg-surface-alt"></div>
</div>
<div class="card__content">
<span class="card__subheading">Feature</span>
<h3 class="card__title">Horizontal Layout</h3>
<div class="card__body">
<p>Image on the left, content on the right.</p>
</div>
</div>
</article>Image on the left, content on the right.
<!-- Standard card -->
<article class="card">
<div class="card__media">
<img src="/image.jpg" alt="Description" />
</div>
<div class="card__content">
<span class="card__subheading">Category</span>
<h3 class="card__title">Card Title</h3>
<div class="card__body">
<p>Card body text goes here.</p>
</div>
<div class="card__footer">
<a href="#">Read more</a>
</div>
</div>
</article>
<!-- Navigation card -->
<a href="/page" class="card card--nav">
<div class="card__content">
<h3 class="card__title">Clickable Card</h3>
<div class="card__body">
<p>Entire card is a link.</p>
</div>
</div>
</a>A card has no intrinsic width — it fills whatever container it sits in. The width should always come from the layout context: a grid column, a flex parent, or a wrapper with a max-width utility.
<!-- Grid controls the width — cards fill their column -->
<div class="grid grid-cols-3 gap-md">
<article class="card">...</article>
<article class="card">...</article>
<article class="card">...</article>
</div>
<!-- Standalone — constrain with a utility on a wrapper -->
<div class="max-w-sm">
<article class="card">...</article>
</div>Use a responsive grid so that 2, 3, or 4 cards sit side by side on larger screens and stack vertically on smaller screens. The grid ensures a calm visual structure.
Never set a fixed width on the card itself. Cards in a grid automatically stretch to equal height. Use .card__footer with margin-top: auto to push footers to the bottom.
<article> for semantic grouping<a> — the entire card is one interactive elementfocus-visible ring (3px solid, 2px offset)prefers-reduced-motion disables the hover translateY animationalt text for meaningful images; use alt="" for decorative imagesDo:
Don't: