Please refer to #3446052: [later phase] Create components for a default design system
Card component definition
A card is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background colors, and powerful display options. If you’re familiar with Bootstrap 3, cards replace our old panels, wells, and thumbnails. Similar functionality to those components is available as modifier classes for cards.
Variants

Markup (TBD)
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="..." alt="Card image cap">
<div class="card-body">
<span class="card-eyebrow">New!</h5>
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
Discussion and talking points
Schema
Should SDCs morph dynamically based on data?
Example: Put as many optional "fields" where data can be printed if present, but these won't break the layout if any are missing.
Nesting components
Scenario: A call to action can look like a link, can be underlined or not, can look like a button, can have an icon, etc.
Does SDC support nesting other components?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Card Variants.png | 193.11 KB | rmontero |
Comments
Comment #2
rmontero commentedComment #3
rmontero commentedComment #4
finnsky commentedCard presented as SDC in Umami
https://git.drupalcode.org/project/drupal/-/tree/11.x/core/profiles/demo...
It is fully BEM powered and uses slots.
Comment #5
larowlanThese should support both manually entered fields but also drawing fields from a node where the link, title, teaser etc is centrally managed
Comment #6
lauriiiComment #7
wim leers#3446722: Introduce an example set of representative SDC components; transition from "component list" to "component tree" will get us to a point where we have sufficiently diverse components (at least for now).
This issue is still relevant; we can keep it(s discussion) around for when we work on the actual default design system, which is for the Theme Builder, which is happening at a later time — see #3450621-6: [later phase] Theme Builder vision.
Comment #8
kristen polFixed typo in summary and made minor formatting updates.
Comment #10
balintbrews