Skip to content
nexubDesign System
v11.9.0

Components · Data Display

KPI Tile

BetaAdded v4.5.0

A headline number with its change versus last period and a trend line.

import { KPITile } from '@nexub/react';
View as Markdown

Playground

Props

Monthly revenue$68,420+11.4% versus last period
TSX
<KpiTile value="$68,420" trend={[42, 48, 45, 56, 61, 68]} label="Monthly revenue" change={0.114} />

Examples

Dashboard row

Monthly revenue$68,420+11.4% versus last period
Customers1,204+3.2% versus last period
Churn2.1%+0.4% versus last period

States

  • Monthly revenue$68,420+11.4% versus last period
    default
  • Monthly revenue
    loading

Props

Props
PropTypeDefaultDescription
labelrequiredstring—What the number is.
valuerequiredReact.ReactNode—The formatted number.
changenumber—Change as a fraction, e.g. 0.114 for +11.4%.
invertbooleanfalseDown is good (churn, costs): flips the colour.
trendnumber[]—Recent values for the sparkline, oldest first.
emptyStateReact.ReactNode—Shown in place of the value when value is null or undefined. No default.
errorStateReact.ReactNode—Shown in place of the data when a load failed, for example an ErrorState with a retry action. Wins over loading and empty.
loadingboolean—Shows a skeleton in place of the data and sets aria-busy.

Accessibility

Screen reader

  • The drawing is hidden from assistive tech; a visually hidden table or caption carries every value.

On iOS & Android