Data displayCredentialsStrip
Searchastronomic.dev# CredentialsStrip
For proof near the top of a page: license, insurance, warranty and years in a row of columns.
Static: no JavaScript.
## Usage
```astro
import CredentialsStrip from "@astronomic-dev/ui/components/CredentialsStrip.astro";
```
## Examples
### Four credentials
A column each, with hairlines between: four on a wide page, two on a phone, each with its own icon tile. Below 36rem the tile sits over the text.
```astro
---
import CredentialsStrip from "@astronomic-dev/ui/components/CredentialsStrip.astro";
import Award from "@lucide/astro/icons/award";
import BadgeCheck from "@lucide/astro/icons/badge-check";
import FileCheck from "@lucide/astro/icons/file-check";
import ShieldCheck from "@lucide/astro/icons/shield-check";
---
<!-- Sixpenny Builders' proof near the top of the page: four columns on a wide page, two on a phone. -->
<CredentialsStrip
items={[
{ term: "License", detail: "Sample license NC 00000", note: "Residential Building, Unlimited", icon: BadgeCheck },
{ term: "Insured", detail: "General liability and workers' comp", icon: ShieldCheck },
{ term: "Warranty", detail: "2 years on workmanship", note: "In writing, with every job", icon: FileCheck },
{ term: "In business", detail: "Since 2009", note: "Apex, NC", icon: Award },
]}
/>
```
### Three, one marker
One marker for every row; the three columns share the row.
```astro
---
import CredentialsStrip from "@astronomic-dev/ui/components/CredentialsStrip.astro";
import BadgeCheck from "@lucide/astro/icons/badge-check";
import { landscaping } from "../_data/groundcrew.ts";
---
<!-- Tilth & Stone Landscapes' three credentials: one marker for every row, and the three columns share the row. -->
<CredentialsStrip items={landscaping.credentials.map(({ label, value }) => ({ term: label, detail: value }))} marker={BadgeCheck} />
```
### A missing detail
Rows without a detail are left out, and the filled columns stretch across the row.
```astro
---
import CredentialsStrip from "@astronomic-dev/ui/components/CredentialsStrip.astro";
import BadgeCheck from "@lucide/astro/icons/badge-check";
---
<!-- A row without a detail is left out: no bonding line here, and the two filled columns stretch across the row. -->
<CredentialsStrip
marker={BadgeCheck}
items={[
{ term: "License", detail: "Sample license AZ ROC 000000", note: "Arizona Registrar of Contractors" },
{ term: "Bonded", detail: "" },
{ term: "Insured", detail: "General liability, $2,000,000" },
{ term: "Certified" },
]}
/>
```
## Props
### CredentialsStrip
| 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.
CredentialsStrip
FreeFor proof near the top of a page: license, insurance, warranty and years in a row of columns.
- File
- CredentialsStrip.astro
- Group
- Data display
- Kind
- Static: no JavaScript
- Examples
- 3
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Four credentials
A column each, with hairlines between: four on a wide page, two on a phone, each with its own icon tile. Below 36rem the tile sits over the text.
This preview did not load.
main.astro
examples/credentialsstrip/main.astro
---
import CredentialsStrip from "@astronomic-dev/ui/components/CredentialsStrip.astro";
import Award from "@lucide/astro/icons/award";
import BadgeCheck from "@lucide/astro/icons/badge-check";
import FileCheck from "@lucide/astro/icons/file-check";
import ShieldCheck from "@lucide/astro/icons/shield-check";
---
<!-- Sixpenny Builders' proof near the top of the page: four columns on a wide page, two on a phone. -->
<CredentialsStrip
items={[
{ term: "License", detail: "Sample license NC 00000", note: "Residential Building, Unlimited", icon: BadgeCheck },
{ term: "Insured", detail: "General liability and workers' comp", icon: ShieldCheck },
{ term: "Warranty", detail: "2 years on workmanship", note: "In writing, with every job", icon: FileCheck },
{ term: "In business", detail: "Since 2009", note: "Apex, NC", icon: Award },
]}
/>Three, one marker
One marker for every row; the three columns share the row.
- License
- Sample license CO 00000 (commercial pesticide applicator)
- Insurance
- General liability and workers' comp
- Warranty
- 1 year on plants, 3 years on patios and walls
Force statethree.astro
examples/credentialsstrip/three.astro
---
import CredentialsStrip from "@astronomic-dev/ui/components/CredentialsStrip.astro";
import BadgeCheck from "@lucide/astro/icons/badge-check";
import { landscaping } from "../_data/groundcrew.ts";
---
<!-- Tilth & Stone Landscapes' three credentials: one marker for every row, and the three columns share the row. -->
<CredentialsStrip items={landscaping.credentials.map(({ label, value }) => ({ term: label, detail: value }))} marker={BadgeCheck} />A missing detail
Rows without a detail are left out, and the filled columns stretch across the row.
- License
- Sample license AZ ROC 000000Arizona Registrar of Contractors
- Insured
- General liability, $2,000,000
Force statemissing.astro
examples/credentialsstrip/missing.astro
---
import CredentialsStrip from "@astronomic-dev/ui/components/CredentialsStrip.astro";
import BadgeCheck from "@lucide/astro/icons/badge-check";
---
<!-- A row without a detail is left out: no bonding line here, and the two filled columns stretch across the row. -->
<CredentialsStrip
marker={BadgeCheck}
items={[
{ term: "License", detail: "Sample license AZ ROC 000000", note: "Arizona Registrar of Contractors" },
{ term: "Bonded", detail: "" },
{ term: "Insured", detail: "General liability, $2,000,000" },
{ term: "Certified" },
]}
/>Minimal · Light