Claims list
A compact list of claims with status, amount and date, used as the recent-activity panel on a dashboard.
Purpose
The recent-claims panel on a dashboard: each row pairs a member Avatar and name with the service line, the formatted amount and a status Badge. It is a summary list, not a work queue — the moment users need to search, sort or page claims, reach for DataGrid.
Use it for
- "Recent claims" panels on dashboards and member detail pages
- Short read-only claim summaries, newest first
Reach for something else
- Operational claim queues (search, sort, paging) → DataGrid
- Static columnar comparison → Table
- Non-claim events → Activity feed
Example
- JTMYR 120.00Approved
Jane Tan
GP · Klinik Mediviron
- ARSGD 340.50Pending
Arif Rahman
Dental · Q&M Dental SG
- MLMYR 0.00Denied
Mei Ling
Optical · VisionCare
- SKMYR 1,880.75Approved
Suresh Kumar
Specialist · Pantai
Rows are plain data — the component derives the avatar initials from member and formats
amount itself:
import { ClaimsList } from "@healthmetrics/ui/claims-list";
<ClaimsList
rows={[
{
id: "1",
member: "Jane Tan",
service: "GP · Klinik Mediviron",
amount: 120, // renders as "MYR 120.00"
status: "approved",
},
// …
]}
/>;Statuses
status drives the badge — approved (success), pending (warning), denied (destructive). The
label is written by the component, so the status is always announced as text, never as colour
alone.
- ACMYR 120.00Approved
Approved Claim
GP · Klinik Mediviron
- PCSGD 340.50Pending
Pending Claim
Dental · Q&M Dental SG
- DCMYR 0.00Denied
Denied Claim
Optical · VisionCare
Amounts and currency
Pass amount as a raw number; the component formats it with the shared currency formatter.
Amounts default to MYR — a cross-border claim passes its own ISO 4217 currency code, and the
amount then renders at that currency's minor units and in its usual digit-grouping convention
(SGD 340.50, JPY 1,000, EUR 1.234,56). Formatting is deterministic across server and
browser, so statically exported pages cannot hydrate differently.
Structure
| Property | Value |
|---|---|
| List | <ul> with --border row dividers (divide-y) |
| Row | 12px vertical padding (py-3), 12px gap |
| Avatar | 36px (size-9), initials fallback derived from member |
| Member | 14px / Inter 500, truncates |
| Service | 12px --muted-foreground, truncates |
| Amount | 14px / Inter 600, tabular-nums |
| Status | Badge — success / warning / destructive |
Best practices
Do
- Keep it to a handful of recent rows inside a Card, with a "View all claims" link to the full DataGrid.
- Pass
amountas a raw number — never a pre-formatted string. - Set
currencyon cross-border claims so the code is visible beside the amount. - Keep
serviceto one compact line ("GP · Klinik Mediviron"); it truncates. - Give every row a stable
id— it is the React key.
Don't
- Grow it into a work queue — no search, sort or paging lives here; that is DataGrid.
- Encode status in the member or service text —
statusrenders the one badge users learn. - Render an empty array and call it done — the component renders nothing, so supply your own empty state ("No claims yet").
Accessibility & keyboard
- Semantic
<ul>/<li>markup — screen readers announce the list and its length. - Status is a Badge with a written label ("Approved", "Pending", "Denied") — never colour alone.
- The avatar shows derived initials as visible text; the member's full name sits beside it, so nothing is lost if the initials read oddly.
- Amounts are formatted text with
tabular-nums— digits align down the list. - Keyboard: none — rows are not interactive. Put the "view claim" affordance on a surrounding link or a "View all" action, not on the row.
Props
ClaimsList takes two props: rows (the array described below) and an optional className on
the list.
| Prop | Type | Default | Description |
|---|---|---|---|
idrequired | string | — | Stable unique key for the row. |
memberrequired | string | — | Member name; initials are derived for the avatar fallback. |
servicerequired | string | — | Service line, e.g. "GP · Klinik Mediviron". |
amountrequired | number | — | Claim amount; formatted by the component, e.g. `120` renders as "MYR 120.00". |
currency | string | undefined | — | ISO 4217 code for `amount`, e.g. "SGD" for a cross-border claim. Defaults to MYR. |
statusrequired | "approved" | "pending" | "denied" | — | Claim status; drives the badge colour and label. |