Data displayCredentialsRows
Searchastronomic.dev# CredentialsRows
For a full credentials list: ruled rows with a check, for licensed trades.
Static: no JavaScript.
## Usage
```astro
import CredentialsRows from "@astronomic-dev/ui/components/CredentialsRows.astro";
```
## Examples
### Ruled rows
The term in a 12rem column from a 36rem list, the detail beside it, and your check at the end in the accent.
```astro
---
import CredentialsRows from "@astronomic-dev/ui/components/CredentialsRows.astro";
import Check from "@lucide/astro/icons/check";
---
<!-- Brassfield Plumbing & Drain's full list: ruled rows, the term in its own column on a wide page, a check at the end. -->
<CredentialsRows
marker={Check}
items={[
{ term: "License", detail: "Sample license OH PL.000000", note: "Ohio master plumber" },
{ term: "Insured", detail: "General liability and workers' comp" },
{ term: "Backflow", detail: "Certified backflow tester", note: "Sample certificate 0000" },
{ term: "Warranty", detail: "1 year on labor" },
]}
/>
```
### In a narrow column
The term sits over the detail; the empty bonding row is left out.
```astro
---
import CredentialsRows from "@astronomic-dev/ui/components/CredentialsRows.astro";
import Check from "@lucide/astro/icons/check";
---
<!-- In a narrow column the term sits over the detail; the empty bonding row is left out. -->
<div class="max-w-xs">
<CredentialsRows
marker={Check}
items={[
{ term: "License", detail: "Sample license CO 00000", note: "Commercial pesticide applicator" },
{ term: "Bonded", detail: "" },
{ term: "Warranty", detail: "1 year on plants, 3 years on patios and walls" },
]}
/>
</div>
```
## Props
### CredentialsRows
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` | `CredentialItem[]` | `[]` | Required. Each row: { term, detail?, note?, icon? }. term is the label, such as "License"; detail the value, such as "Sample license OH PL.000000"; note a quieter line under it; icon your icon component for that row's marker. A row shows only with its term and its detail; with none filled, nothing renders. |
| `marker` | `IconComponent` | None | Your icon component, the marker on every row (a row's own icon wins). Decoration, hidden from a screen reader. |
| `class` | `string` | None | More classes for the <dl>, merged with cn(), so yours win on conflicts. |
Any other attribute goes on the <dl>.
## Accessibility
- A description list: a screen reader says each term with its detail, and how many rows there are.
- Only filled rows render, so a missing license or warranty never leaves an empty term.
- The marker is decoration, hidden from a screen reader: the term says what the row is.
- The note is never hidden at a narrow width; it wraps.
CredentialsRows
FreeFor a full credentials list: ruled rows with a check, for licensed trades.
- File
- CredentialsRows.astro
- Group
- Data display
- Kind
- Static: no JavaScript
- Examples
- 2
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Ruled rows
The term in a 12rem column from a 36rem list, the detail beside it, and your check at the end in the accent.
This preview did not load.
main.astro
examples/credentialsrows/main.astro
---
import CredentialsRows from "@astronomic-dev/ui/components/CredentialsRows.astro";
import Check from "@lucide/astro/icons/check";
---
<!-- Brassfield Plumbing & Drain's full list: ruled rows, the term in its own column on a wide page, a check at the end. -->
<CredentialsRows
marker={Check}
items={[
{ term: "License", detail: "Sample license OH PL.000000", note: "Ohio master plumber" },
{ term: "Insured", detail: "General liability and workers' comp" },
{ term: "Backflow", detail: "Certified backflow tester", note: "Sample certificate 0000" },
{ term: "Warranty", detail: "1 year on labor" },
]}
/>In a narrow column
The term sits over the detail; the empty bonding row is left out.
- License
- Sample license CO 00000Commercial pesticide applicator
- Warranty
- 1 year on plants, 3 years on patios and walls
Force statemissing.astro
examples/credentialsrows/missing.astro
---
import CredentialsRows from "@astronomic-dev/ui/components/CredentialsRows.astro";
import Check from "@lucide/astro/icons/check";
---
<!-- In a narrow column the term sits over the detail; the empty bonding row is left out. -->
<div class="max-w-xs">
<CredentialsRows
marker={Check}
items={[
{ term: "License", detail: "Sample license CO 00000", note: "Commercial pesticide applicator" },
{ term: "Bonded", detail: "" },
{ term: "Warranty", detail: "1 year on plants, 3 years on patios and walls" },
]}
/>
</div>Minimal · Light