PolyHunter

MetricsNumbers

A 96px minimum-height metric strip on surface/default. Each equal-width section has a 16px icon with a 13/18 label above a 24/28 semibold value. Callers own every icon, label, value and optional palette color. A value can contain more than text, including the small blue chevron shown here. The shared Separator atom divides sections; standard metrics wrap two per row on narrow screens. The explicit mobile mode shows two values in a bordered card, up to two actions below them, and up to two more values in a summary outside it.

Playground

Live preview

Reserved for missions
$40.00
Total paid
$1,240.00
Followers
1,280

Playground

Live preview

Available balance
$120.00
Reserved
$40.00
This month
Earned$25.00
Spent$35.00

States and variants

Value without an icon, with an explanation

$120.00

Reserved funds with a trailing chevron

Reserved for missions
$40.00

Three metrics with different duotone icon colors

Reserved for missions
$40.00
Total paid
$1,240.00
Followers
1,280

Four metrics with equal columns and dividers

Reserved for missions
$40.00
Total paid
$1,240.00
Followers
1,280
Disputes
2

Four metrics in two mobile rows

Reserved for missions
$40.00
Total paid
$1,240.00
Followers
1,280
Disputes
2

Five metrics wrapping on narrow screens

Reserved for missions
$40.00
Total paid
$1,240.00
Followers
1,280
Disputes
2
Open missions
18

Custom value content and palette color

Hunter growth
+12%this week
Disputes
2

Empty state supplied by the caller

No metrics yet.

Mobile

Pass mobile for the compact composition. The first metric is wider and larger; the third and fourth appear below the card. The caller supplies the summary lead-in and zero, one or two footer actions.

Examples

Four values and two equal footer actions

Available balance
$120.00
Reserved
$40.00
This month
Earned$25.00
Spent$35.00

Three values and one full-width action

Available balance
$120.00
Reserved
$40.00
This month
Earned$25.00

Two values without footer actions or summary

Available balance
$120.00
Reserved
$40.00

One value with a caller-owned action

Available balance
$120.00

Code

import { LockBoldDuotoneIcon, MetricNextIcon, MetricsNumbers } from "@npolyhunter/ui";

<MetricsNumbers
  metrics={[
    {
      id: "reserved",
      icon: <LockBoldDuotoneIcon
        color="var(--color-status-info-foreground)"
        secondaryColor="var(--color-status-info-foreground)"
      />,
      label: "Reserved for missions",
      value: <><span>$40.00</span><MetricNextIcon className="size-3.5 text-status-info-foreground" /></>,
    },
    { id: "paid", icon: <WalletBoldDuotoneIcon />, label: "Total paid",
      value: "$1,240.00", valueColor: "var(--color-reward-accent)" },
  ]}
  emptyState={null}
  mobile={false}
  mobileFooterActions={undefined}
  mobileSummaryLabel={undefined}
  className={undefined}
/>;
import { Button, LockBoldDuotoneIcon, MetricsNumbers, TransferHorizontalBoldDuotoneIcon } from "@npolyhunter/ui";

<MetricsNumbers
  mobile
  metrics={[
    { id: "balance", icon: <TransferHorizontalBoldDuotoneIcon />,
      label: "Available balance", value: "$120.00" },
    { id: "reserved", icon: <LockBoldDuotoneIcon />,
      label: "Reserved", value: "$40.00", valueColor: "var(--color-status-info-foreground)" },
    { id: "earned", icon: null, label: "Earned", value: "$25.00" },
    { id: "spent", icon: null, label: "Spent", value: "$35.00",
      valueColor: "var(--color-reward-accent)" },
  ]}
  mobileSummaryLabel="This month"
  mobileFooterActions={[
    <Button key="add" variant="primary">Add funds</Button>,
    <Button key="withdraw" variant="outline">Withdraw</Button>,
  ]}
  emptyState={null}
  className={undefined}
/>;

Used in

Includes use through shared UI components.

AppBack Office