Card

Card is the visual grouping primitive. A titled panel with an optional description, an optional icon, and optional link behavior : renders as <a> when you set Href, as a plain <div> otherwise.

Basic use

Setting Href renders the card as an anchor : the whole card becomes clickable.

Set External="true" to add target="_blank" and rel="noopener" : safe for outbound links.

With an icon

Pass raw SVG markup as IconSvg. It renders inside a .doc-card-icon container above the title.

Escaping SVG in markdown

When authoring in .md, the SVG markup inside IconSvg="..." must be HTML-entity-encoded (&lt;, &gt;) : otherwise the markdown parser sees it as raw tags and eats them. In a .razor page you'd just write IconSvg="<svg …>...</svg>".

With child content

Use ChildContent for anything richer than a description : lists, a code block, another primitive.

In a grid

Card's natural habitat is inside CardGrid, which lays out any number of children on a responsive grid.

Props

Prop Type Default Description
Title string? Optional title, rendered as `.doc-card-title`.
Description string? Optional short description below the title.
External bool false When true (and Href set), adds `target='_blank'` and `rel='noopener'`.
ChildContent RenderFragment? Rich body content, rendered below the description.

See also