# Stat strip

> One row of metrics for one source, with where the numbers come from.

- Group: Data
- Status: stable
- Aliases: metrics-row
- HTML page: https://design.ipmnx.com/components/stat-strip/
- Spec: https://design.ipmnx.com/design/#nx-stat-strip

## Preview

**Post performance**

```html
<div class="nx-statstrip">
  <span class="nx-statstrip__label">LinkedIn</span>
  <dl class="nx-statstrip__stats">
    <div class="nx-statstrip__stat">
      <dt>Impressions</dt>
      <dd class="tabular-nums">4,210</dd>
    </div>
    <div class="nx-statstrip__stat">
      <dt>Reactions</dt>
      <dd class="tabular-nums">87</dd>
    </div>
    <div class="nx-statstrip__stat">
      <dt>Clicks</dt>
      <dd class="tabular-nums">64</dd>
    </div>
  </dl>
  <span class="nx-statstrip__source">synced 2 h ago</span>
</div>
```

```tsx
<NxStatStrip
  label="LinkedIn"
  stats={[
    { label: "Impressions", value: "4,210" },
    { label: "Reactions", value: 87 },
    { label: "Clicks", value: 64 },
  ]}
  source="synced 2 h ago"
/>
```

## API

### React props (NxKit)

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | `ReactNode` |   | yes | The source (platform, channel). |
| `stats` | `{ label; value }[]` |   | yes | The metrics. |
| `source` | `ReactNode` |   | yes | Origin of the numbers: synced when / manual. |
| `action` | `ReactNode` | `undefined` |   | e.g. "Enter numbers". |

### Classes

| Class | Description |
| --- | --- |
| `.nx-statstrip` | Row |
| `.nx-statstrip__source` | Origin, end-aligned |

## Accessibility

- A definition list (dt/dd): each value is read with its label.

## Do / Don't

- Do: Always show the source of the numbers.
- Don't mix synced and hand-entered numbers in one strip without saying so.

## Related

- [KPI tile](https://design.ipmnx.com/components/kpi-tile.md)
- [Platform badge](https://design.ipmnx.com/components/platform-badge.md)

---

Source: registry.js (NX Design System)
