Stat

A single metric with label, value, help text and a trend indicator.

Total users24,52112.4% from last month
Bounce rate18.2%3.1% from last month

Import#

import { Stat } from "astralis-ui";
// Stat.Label, .Value, .HelpText, .Indicator

Usage#

Values render with tabular numerals so dashboards line up; the indicator colors green for increase and red for decrease — note that "decrease" is just the arrow direction, not a judgment (a falling bounce rate is good news).

Props#

The parts take only children and className, except:

PropTypeDefaultDescription
Stat.Indicator type"increase" | "decrease""increase"Arrow direction and color.

Compose Stats in a Grid or HStack for dashboard rows, and inside a Card for tiles.