Variants

Four layout variants cover the common catalog, hero, dense-list, and text-only cases.

Preview Backgrounds

Five surface treatments for the preview area. Each card instance can pick a different one to create visual rhythm in a grid.

Category Accents

A faint top-bar stripe signals the card's category. On hover, the stripe expands to full width and the border color follows the accent.

Badges

Optional label pinned to the top-left of the preview surface. Use BadgeDark when the background needs a dark-on-light chip for contrast.

Grid Density

Four opt-in grid wrappers control column width. Drop any set of cards into .component-card-grid (or a density modifier) — consumers don't have to hand-roll the CSS grid.

.component-card-grid280px min column width — the default.
.component-card-grid--dense224px min — more columns, tighter gap.
.component-card-grid--featured352px min — wider cards for hero grids.
.component-card-grid--compact320px min — paired with the compact variant.

Portable HTML Usage

The Blazor wrapper is thin — all styles live in Styles/components/component-card.css and compile into the standalone wwwroot/design-system.css. Any project that imports that file can use the markup below directly, no Blazor required.

index.htmlhtml
<div class="component-card-grid"> <a href="/buttons" class="component-card component-card--default component-card--accent-brand"> <span class="component-card__badge">NEW</span> <div class="component-card__preview component-card__preview--dotted" inert aria-hidden="true"> <button class="btn btn-sm btn-primary">Click me</button> </div> <div class="component-card__body"> <div class="component-card__title-row"> <h3 class="component-card__title">Button</h3> </div> <p class="component-card__desc">Primary, secondary, tertiary styles.</p> </div> </a> </div>
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.