On this page
@addTagHelper *, Webority.Ui.RazorOne resource card
A resource card names the thing the reader gets, with an icon, a title, one line of detail and where it goes.
A grid of resources
Group related resources in one grid at the foot of a page, so the reader finds the next step there.
Routing and external links
Keep in-app links in the product, and open an outside destination in a new tab with a safe relationship set.
linkComponent: router link vs plain anchor
Razor has no router abstraction: every card is a plain anchor, which is already client-navigable here.
Every option
Every value of every prop, one cell each.
icon: the tile glyph
icon="file-text"icon="download"icon="lightbulb"icon="external-link"title: the link text
title="Resource title": the link textdescription: present vs omitted
description setdescription omitted, title onlylong title and description wrap, never overflowhref: where the card links
href="/portal/doc": the card links hereexternal: link target and rel
(default): same tab, no relexternal: new tab, rel="noopener noreferrer"linkComponent: router link vs plain anchor
(default): plain <a href>linkComponent={Link} (Razor: href): React receives `to`; Razor always uses a plain hrefclassName passthrough
class="analytics-card": appended, base class keptGuidance
What to do, and what to avoid.
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. → AppChoiceCard
- It is a plain navigation link in a menu or nav. → AppShell
- It performs an action rather than navigating. → AppButton
- It is a pricing tier. → AppPricingCard
Link text that names the resource
The title names the resource, the text says the format and what to do with it, and the icon matches the action (a download).
"Click here" twice tells the reader nothing about the destination, and it is what a screen reader announces as the link name.
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
6 props. The 5 most used come first.
Used on most screens 5 props
| Prop | Type | Default | Description |
|---|---|---|---|
| icondefault - | string | - | Required. The glyph in the tile: a library icon name. |
| titledefault - | string | - | Required. The resource's name. It is the link text. |
| descriptiondefault - | string | - | One line of supporting detail. |
| hrefdefault - | string | - | Required. Where the card links to. |
| externaldefault false | bool | false | Open in a new tab. |
Less common 1 props
| Prop | Type | Default | Description |
|---|---|---|---|
| classdefault - | string | - | Extra classes on the card. |
Screen reader
2 notes- The whole card is one link, so its accessible name is its text: the title, then the supporting text. The icon glyph is hidden from assistive technology.
- An external card opens in a new tab with rel="noopener noreferrer".
Do and avoid
1 pairsLink text that names the resource
The title names the resource, the text says the format and what to do with it, and the icon matches the action (a download).
"Click here" twice tells the reader nothing about the destination, and it is what a screen reader announces as the link name.