Design System
Widgets

Stat card

A single headline figure with an optional trend, the tile a dashboard is built from.

Purpose

The KPI tile for dashboard stat rows: one bold value, its label, an optional product icon and a coloured trend. It is the composition the Card page tells you not to rebuild by hand — a StatCard is a Card, padded and laid out once so every headline figure across the product reads the same.

Use it for

  • Dashboard stat rows: active members, claims this month, approval rate
  • Any single figure with an at-a-glance delta

Reach for something else

Example

Active members

12,480

+4.2%

Dashboard row

The intended habitat: a responsive grid of four. Note the last tile — approval time falling is good news, so it sets upIsGood={false} and the downward trend renders green.

Active members

12,480

+4.2%

Claims this month

3,219

+1.1%

Approval rate

94.6%

+0.8%

Avg. approval time

2.4h

-12%

Trend states

Colour follows whether the movement is good, not which way the arrow points: up is green by default, and upIsGood={false} inverts the mapping for cost-like metrics. A flat trend is always muted. Omit trend entirely and the row disappears — the icon is independently optional.

Claims approved

1,204

+3.1%

Panel utilisation

61%

-2.4%

Avg. approval time

2.4h

-12%

Open tickets

38

±0%

Benefit groups

17

Members

12,480

Structure

PropertyValue
ContainerCard surface, 20px padding (p-5)
Label14px / Inter 500, --muted-foreground (text-sm font-medium)
Value30px / Inter 700, --foreground (text-3xl font-bold)
Icon chip44px square (size-11), --radius-md, --accent fill, 24px icon
Trend row12px above (mt-3), 14px / Inter 600, 18px arrow glyph
Trend tonesgood --success-text · bad --destructive · flat --muted-foreground

Best practices

Do

  • Pre-format the value — value renders verbatim, so pass "12,480", "94.6%", "2.4h".
  • Keep the sign in trendValue ("+4.2%", "-12%") — it is the only part of the trend screen readers hear.
  • Set upIsGood={false} for cost-like metrics (approval time, rejections) so a fall reads green.
  • Keep labels to a few words; the label is the tile's only description.

Don't

  • Rebuild the tile from a plain Card — this widget exists so every KPI reads the same.
  • Put a chart, list or action inside — that is Chart card or a plain Card.
  • Compare a value against a limit here — that is Entitlement progress.
  • Use trend colour as the only signal — pair it with a signed trendValue.

Accessibility & keyboard

  • Renders a plain Card <div> — no heading semantics. Label and value are <p> elements read in order: label, then value, then trend text.
  • The product icon and the trend arrow are decorative (aria-hidden), so the trend's direction must survive in the text — always include the sign in trendValue.
  • Trend colour is paired with the arrow glyph and the signed value; no information lives in colour alone.
  • Keyboard: none — the tile is not interactive. Link the surrounding dashboard section, not the tile itself.

Props

Extends React.HTMLAttributes<HTMLDivElement>, so any div attribute (className, id, data attributes…) passes through to the underlying Card.

PropTypeDefaultDescription
labelrequiredstring—Metric label, e.g. "Active members".
valuerequiredReact.ReactNode—Primary value, e.g. "12,480".
icon"insurer" | "corporateOrganisation" | "partneredProviders" | "revenue" | "searchMembers" | "treatments" | "tickets" | "financeMenu" | "emailTemplates" | "masterFile" | "sms" | "claims" | "guaranteeLetters" | "financeTransactions" | "payments" | "signatures" | "reports" | "administration" | "action" | "menu" | "debugTools" | "exportToExcel" | "download" | "import" | "upload" | "upgrade" | "search" | "nextPage" | "previousPage" | "lastOfThePages" | "firstOfThePages" | "refresh" | "expandDown" | "expandRight" | "collapseUp" | "createNew" | "addNew" | "addNewProfile" | "information" | "email" | "folderClose" | "folderOpen" | "print" | "generateReport" | "share" | "bank" | "messageReceivedOnly" | "messageCanReply" | "pdpa" | "security" | "healthRelatedInsurance" | "tutorial" | "referralLetter" | "fieldDropDown" | "navigationDown" | "navigationUp" | "filterExpand" | "filterCollapse" | "externalLink" | "receipt" | "covid19Screening" | "collateral" | "creditLimitAndBalance" | "billingOverview" | "memberInformation" | "employees" | "medicalLeaves" | "analysis" | "comparison" | "homepage" | "dashboard" | "benefitGroups" | "makePayments" | "principal" | "dependants" | "remove" | "delete" | "approve" | "reject" | "cancel" | "delegate" | "batchAction" | "switchAccount" | "calendar" | "insurance" | "department" | "subsidiary" | "billingAccount" | "claimPolicies" | "default" | "globalUniversal" | "edit" | "allow" | "deny" | "addOn" | "revenueSubscription" | "help" | "contact" | "changePassword" | "manageAccount" | "login" | "loginActivities" | "logout" | "hospital" | "pharmacy" | "prescription" | "ultrasound" | "languages" | "map" | "details" | "properties" | "confirmation" | "newCheckIn" | "patientCheckIns" | "allGood" | "transactions" | "patient" | "lateClaims" | "doctors" | "outpatientSpecialist" | "inpatientHospitalisation" | "roles" | "users" | "auditLogs" | "ascending" | "descending" | "chart" | "mobileAppEnabled" | "reimbursementClaims" | "preEmployment" | "gp" | "dental" | "optical" | "specialist" | "hospitalisation" | "maternity" | "healthScreening" | "pharmacy2" | "customTreatments" | "allergyAndImmunology" | "anaesthesiology" | "cardiologyAndAngiology" | "dentistry" | "dermatology" | "emergencyDepartment" | "endocrinology" | "gastroenterologyAndHepatology" | "generalSurgery" | "geriatricMedicine" | "haematology" | "infectiousDisease" | "internalMedicine" | "nephrology" | "neurology" | "obstetricsAndGynaecology" | "occupationalHealthAndVaccine" | "oncology" | "ophthalmology" | "oralAndMaxillofacial" | "orthopaedic" | "ent" | "paediatricDentistry" | "paediatrics" | "podiatry" | "psychiatry" | "pulmonologyAndRespiratory" | "radiologyAndImaging" | "reconstructivePlastic" | "rehabilitationMedicine" | "rheumatology" | "urology" | "vascularSurgery" | "xRay" | "femaleDoctorAvailable" | "open24Hours" | "covidTestRtk" | "covidTestPcr" | undefined—Optional leading product icon.
trend"up" | "down" | "flat" | undefined—Trend direction; colours and arrow follow it.
trendValuestring | undefined—Trend value text, e.g. "+4.2%".
upIsGoodboolean | undefinedtrueWhether an upward trend is good. Inverts the trend colour for cost-like metrics (e.g. average approval time), where a downward trend should read as positive.
StatCard in Storybook

On this page