AppInfoList
Read-only label/value rows, each with a leading icon tile — a contact or details panel.
<app-info-list><app-info-row icon="mail" label="Email" value="…" /></app-info-list><app-info-list> states a handful of facts about one thing — the contact panel on a client record, the details column beside a form, the summary in a drawer. Each row is an icon tile, a label, and a value.
It is deliberately read-only. If a value can be edited, it belongs in a form field, not here — a list that mixes stated facts with editable ones makes the reader guess which is which.
Playground
One row, live. Each change re-renders the real tag helper on the server, so the markup underneath is the exact call that produced the row above it.
value never shows as a blank row — <app-info-list> renders a muted “—” instead, so a missing fact reads as “no value”, not a broken layout.Basic
Each row takes an icon, a label and a value. The label is uppercase and small so the value is what the eye lands on.
Show code
<app-info-list>
<app-info-row icon="user" label="Primary contact" value="Ravi Kumar" />
<app-info-row icon="map-pin" label="Site" value="Hinjawadi, Pune, MH" />
</app-info-list>
Actionable rows
Give a row an href and it renders as a link — a mailto:, a tel:, a document URL. A row without one renders as a plain div, so a value that cannot be acted on never looks clickable.
Show code
<app-info-row icon="mail" label="Email" value="ravi@acme.example" href="mailto:ravi@acme.example" /> <app-info-row icon="map-pin" label="Site" value="Hinjawadi, Pune, MH" />
Inside a card
The usual home. The first and last rows shed their outer padding, so the list sits flush against the card body without a doubled gap.
When to use
Use it when
- You are stating several facts about one record.
- Some of the values are actionable (email, phone, a document link).
- The panel is read-only — a details view, a drawer, a summary column.
Reach for something else when
- The values are editable. → app-input and friends
- It is one headline number. → app-kpi-tile
- You are listing many records. → app-data-table
- The facts are events over time. → app-timeline
Best practices
Every option
The whole surface of the tag helper, one cell per value — a row without href, every value state, a sample of icons, and the class passthrough.
row — with vs without href
value — populated, null, and empty string
value="ravi@acme.example"
value="" — renders "—"
null distinct from an empty string — value="" already covers what React's null/'' both render as: a muted “—”.value — ReactNode
React-only — Razor has no node slot
AppInfoList accepts a ReactNode as value (e.g. bolded text). The Razor <app-info-row> takes a plain string — reach the same visual outcome by pre-formatting the string, since a tag helper attribute cannot carry markup.icon — a sample of names
icon="mail"
icon="user"
icon="phone"
icon="map-pin"
icon="building"
icon="calendar"
icon="briefcase"
icon="globe"
icon="credit-card"
icon="circle"
class — passthrough
(default)
class="contact-card"
multiple rows
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
| icon | string | — | Glyph for the round tile (on <app-info-row>). Match it to the field. |
| label | string | — | What the value is (on <app-info-row>). Be specific. |
| value | string | — | The fact itself, pre-formatted (on <app-info-row>). React-only: also accepts a ReactNode — Razor takes plain text only. |
| href | string | — | Makes the row a link (on <app-info-row>). Omit for a plain row. |
| class | string | — | Extra classes on the list (on <app-info-list>). Matches React's className. |