full
Autumn season
Three plays, one evening. Doors open at seven; the first curtain rises at half past.
A frame with named slots: media, header, body, actions. The card places them and never styles what is inside; the content here is Text and Button. No JavaScript. Switch the brand: radius, inset, spacing and shadow change through semantic tokens, the slots stay where they are.
Default: data-variant="elevated", which also applies when the attribute is missing. The variant changes the frame only, never the slots. Every slot is optional; a missing slot takes no space and leaves no gap.
elevatedfull
Three plays, one evening. Doors open at seven; the first curtain rises at half past.
no-media
Three plays, one evening. Doors open at seven; the first curtain rises at half past.
header-body
Three plays, one evening. Doors open at seven; the first curtain rises at half past.
outlinedfull
Three plays, one evening. Doors open at seven; the first curtain rises at half past.
no-media
Three plays, one evening. Doors open at seven; the first curtain rises at half past.
header-body
Three plays, one evening. Doors open at seven; the first curtain rises at half past.
When a layout stretches cards to the same height, body grows and actions stays at the end of every card.
Sunday at two.
Three plays, one evening. Doors open at seven; the first curtain rises at half past.
Two intervals. The bar is open throughout.
Only the slots in card.api.json are placed. A direct child with another data-slot value, or with none, is not rendered: it is not visible, takes no space, leaves no gap and is not in the accessibility tree. The two cards below are identical; the second one also contains <div data-slot="footer"> and a bare <p>.
Header and body.
Not a Card slot: never placed.
Header and body.
No data-slot: never placed.
The card has no states and no motion: no hover lift, no transitions. Motion inside a slot belongs to the slot's content; the buttons above follow Button's own reduced-motion rule (ADR 0003).
<link rel="stylesheet" href="@iahola/troupe-tokens/troupe.css">
<link rel="stylesheet" href="@iahola/troupe-components/card/styles.css">
<link rel="stylesheet" href="@iahola/troupe-components/text/styles.css">
<link rel="stylesheet" href="@iahola/troupe-components/button/styles.css">
<article class="troupe-card" aria-labelledby="card-title">
<div data-slot="media"><img src="ensemble.jpg" alt="The ensemble on stage"></div>
<header data-slot="header">
<h3 class="troupe-text" data-variant="title" id="card-title">Autumn season</h3>
</header>
<div data-slot="body">
<p class="troupe-text">Three plays, one evening.</p>
</div>
<div data-slot="actions">
<button type="button" class="troupe-button">Book</button>
<button type="button" class="troupe-button" data-variant="ghost">Details</button>
</div>
</article>Root: <article> for a self-contained card (default), <section aria-labelledby> for a named part of the page, <div> for visual grouping only. Full specification: packages/components/card/README.md.