Review design tokens
Needs reviewCompare spacing and focus states before the sample release. This is a summary, not the full task.
A card groups a summary and its related actions into one surface. Use it when the item has a clear identity: a project, pet profile, report or product. For dense comparable rows, a table or list is usually easier to scan. A border alone does not make unrelated content a card.
Open sample details changes only the local result text. Select sample toggles an explicit button's pressed state and the highlighted card's border. Neither entire card is clickable; text remains selectable and controls keep their native semantics. All data is fictitious.
Compare spacing and focus states before the sample release. This is a summary, not the full task.
A selected card still needs a semantic control. The surface itself is not a disguised button.
No sample action yet.
All names and data are fictitious. No task, account or stored record changes.| Part | Purpose |
|---|---|
| Container | Groups one item, with the theme's surface, border and spacing. |
| Header / title | Names the item and sets its place in the page's heading hierarchy. |
| Metadata or status | Distinguishes the item and helps scanning without replacing the title. |
| Optional media | Gives useful visual information; include fitting alternative text or mark decorative media accordingly. |
| Body | Contains the compact explanation or key data. |
| Footer / actions | Provides a clear next action without making every pixel interactive. |
| Optional selection control | Owns selection, focus and accessible state. |
CardUsageDemo.vue has no props or emitted events. Its selected: boolean ref starts false and message: string starts with the ready text. Open sample details updates message. Select sample inverts selected, changes the border and sets aria-pressed on that button. There is no fetch, save, route, image loader or persistence.
A consuming application can model its records independently:
type CardSummary = {
id: string
title: string
eyebrow?: string
description: string
status?: { label: string; tone: 'neutral' | 'success' | 'warning' | 'danger' }
media?: { src: string; alt: string }
detailHref?: string
action?: { label: string; run: () => void | Promise<void> }
}This is an application data model, not a shared Card prop API across catalogs. Keep selected IDs separately from records if selection belongs to the view.
<article class="l-card">
<span class="l-eyebrow">PROJECT · SAMPLE-024</span>
<h3>Review design tokens</h3>
<p>Compare the spacing and focus states.</p>
<div class="l-card-foot">
<span class="l-badge l-badge-warn">Needs review</span>
<a href="/components#card">View component example</a>
</div>
</article>The heading level must fit the consuming page; h3 is not a universal requirement. This example uses a real repository URL rather than a dead href="#". A product should substitute its own resolved detail route.
<div class="summary-grid">
<!-- Repeat independent article elements, each with a unique title. -->
</div>
<style>
.summary-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
gap: 1rem;
}
</style>Do not use CSS order to create a different visual reading order from the DOM. Keep the grid meaningful when it becomes a single column. For a list of cards, a semantic list may be more appropriate than unrelated divs.
tabindex="0" on a static article just to animate it.| Template / surface | Source and implementation |
|---|---|
| Lustro | UI kit, components, guide: l-card, eyebrow, body and l-card-foot with separate actions. |
| Lustro expanded | Basic/header/footer, image/horizontal/highlighted, list/grid groups: visual BSX specimens. |
| Felix | Molecules: fx-card and fx-card-title, amount and action. Expanded cards cover layout variants. Do not confuse Card with the separate ChoiceCard or HoverCard patterns. |
| Lumen | Expanded cards link to the scoped Bootstrap gallery. |
| Scopecraft | Expanded cards, including horizontal, highlighted and group layouts. |
| Pawprint | Pet profile/cards: pp-card containing pet identity and care status; other card surfaces hold forms and care history. |
| Relay | Catalog: Studio sk-card / sk-card-title, summary amount and footer action under Relay tokens. |
| Folio | Catalog: Studio card structure with Folio tokens and financial sample content. |
| Pace | Catalog: Studio summary card with booking-oriented sample data and Pace styling. |
| Spark | Catalog: Studio card structure under Spark tokens. |
| Bastion | Cards: Bootstrap alpha card, card-header, card-body and scoped button classes. |
| PulseFit | Standalone cards: bundled gallery variants, retaining its own styles and markup. |
Card/KPI catalog examples are included here for their container anatomy. KPI meaning, number formatting and trends belong to their own documentation task; this guide does not claim those have been implemented or verified as real data.
The selected demo card changes border color over 140ms; reduced motion removes that transition. Selection remains visible through the button's pressed state and a named result. There is no automatic movement, lift or card reordering.
Use meaningful headings and text, keep nested controls separate and preserve a logical Tab order. A static card is not a button, landmark or live region by default. Do not nest links or buttons inside an all-card link. Important status must include words and not depend on a border or image alone. Check focus outlines, long labels, zoom and narrow layouts in the actual app.
Import CardUsageDemo.vue for this local example. It uses the existing Lustro card/button/badge classes, with scoped layout and selection styling. Other catalogs use the distinct namespaces and wrappers above, not a single installed Card package. Image, grid and horizontal variants are documented through existing specimens, not invented component props.
Render untrusted title/description strings safely as text, resolve routes from actual records and check authorization before actions. The application owns data loading, error handling, navigation and persistence. No guide action changes real data.
Open a detail panel without losing the page behind it. This shared pattern follows the current template's colors. Fictitious data; actions stay local.