AppResourceCard
A link card to a resource — a help article, a guide, a template, an external doc.
<app-resource-card icon="file-text" title="…" text="…" href="…" /><app-resource-card> is a link with room to explain itself — a help-centre article, a downloadable template, a guide, an external standard. Icon tile, title, one line of context; the whole card is the target.
It looks much like <app-choice-card> and the difference is behavioural: this one navigates, that one is a form control you select. Pick by what happens on click.
Playground
Every attribute, live. Each change re-renders the real tag helper on the server, so the markup underneath is the exact call that produced the card above it.
linkComponent is a router render-prop with no Razor equivalent — a plain href is already client-navigable on this surface. See Routing and external links.Basic
An icon, a title, one line of supporting text, and where it goes. The text should say what the reader gets, not repeat the title.
Show code
<app-resource-card icon="file-text" title="How risk is scored"
text="The IEC 62305-2 method, in plain terms" href="/help/risk-scoring" />
A grid of resources
Wrap them in .res-grid for the standard responsive layout: one column on a phone, two from sm, three from lg.
Show code
<div class="res-grid">
<app-resource-card icon="file-text" title="How risk is scored" … />
<app-resource-card icon="download" title="Zone survey template" … />
</div>
Routing and external links
For an in-app destination a plain href is already client-navigable — Razor has no separate router abstraction to reach for. For a destination outside the product set external — it opens in a new tab with the right rel.
external adds target="_blank" plus rel="noopener noreferrer".Show code
<app-resource-card icon="external-link" title="IEC 62305-2"
href="https://webstore.iec.ch/" external="true" />
external sets both.When to use
Use it when
- You are linking somewhere and the link needs a line of explanation.
- Several such links sit together as a “related help” or “templates” block.
- The destination is a document, article, guide or download.
Reach for something else when
- It is a selectable option in a form. → app-choice-card
- It is a plain navigation link in a menu. → a link / app-shell nav
- It performs an action rather than navigating. → app-button
- It is a pricing tier. → app-pricing-card
Best practices
Every option
The whole surface of the component, one cell per value or behaviour.
icon — the tile glyph
icon="file-text"
icon="download"
icon="lightbulb"
icon="external-link"
icon="box-arrow-up-right"
text — present vs omitted
text omitted — title only
long title and text — wraps, does not overflow
external — link target and rel
(default) — same tab, no rel
external="true" — new tab, rel="noopener noreferrer"
linkComponent — router link vs plain anchor
(only shape) — plain <a href>
linkComponent swaps the rendered element for a router Link so navigation stays client-side. Razor has no router abstraction to swap in — a plain href anchor is already the whole story here.class passthrough
class="analytics-card" — appended, base class kept
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
| icon * | string | — | Icon name for the tile. |
| title * | string | — | Names the resource. This is the link's accessible name. |
| text | string | — | One line of supporting detail. |
| href * | string | — | Where it goes. |
| external | bool | false | Open in a new tab with rel="noopener noreferrer". |
| linkComponent | — | — | React-only; not a tag-helper attribute. A plain href is already client-navigable in Razor — there is no router abstraction to swap in. |
| class | string | — | Extra classes on the card. |