Component

Stat

A stable readout for dashboards and compact summary bands.

Preview

Balance$8,742
Pace$64
Over$18

Installation

Install the package, then import the component and shared stylesheet in your app.

Package install

Install the package when you want components imported from axie-ui.

install
pnpm add axie-ui

Import

code
import "axie-ui/styles.css";import { Stat } from "axie-ui";

Registry install

Use the direct URL when you want shadcn to copy editable source into your app. This works without the official registry and does not install axie-ui.

registry
pnpm dlx shadcn@latest add https://axie.alexi.life/r/stat.json

Copied source import

code
import "@/styles/axie.css";import { Stat } from "@/components/axie/stat";

Prefer @axie/stat? Add the Axie namespace once from the Installation page, then use that shorthand.

Usage

code
import { Stat } from "axie-ui";export function Example() {  return <Stat label="Pace" tone="accent" value="$64" />;}

Accessibility

  • Pair numbers with labels that explain the unit or measure.
  • Use tabular numbers for changing values.
  • Do not use color alone to signal positive or negative movement.

API Reference

PropTypeDefaultDescription
labelstring-Stat label.
valuestring-Stat value.
toneneutral | accent | dangerneutralControls value color.