Skip to content
Hazine

Metric and stat tiles

1 of 6 shipped. Each take is a different structure, and the note under its title says how.

  • metric and stat tiles

    The baseline tile: one value, one delta, one period. Direction is carried by sign, icon and hidden text together, with no chart and no comparison.

    shadcn add @hazine/metric-card

    Depends on card, @hazine/animated-counter, lucide-react

Planned 5

  • Metric tile with sparkline

    Adds a time dimension through a hand-rolled SVG path with no chart library; the graphic is aria-hidden and a generated sentence ('Up 12% over 14 days, low 310, high 482') carries the meaning.

  • Metric tile with target progress

    The value is framed relative to a target instead of a previous period; the bar clamps at 100 percent and switches to an 'over target' state with its own label and icon.

  • Comparison pair tile

    Two equal-weight values in one tile instead of a headline plus a small delta, so the reader sees both numbers at full size; each value has its own label and the difference is a third, derived row.

  • Breakdown list tile

    Decomposes one number into its parts: segments are told apart by marker shape and order as well as chart tokens, and the list doubles as the legend so nothing depends on colour.

  • Percentile range tile

    Shows a distribution instead of a single number with a delta: the strip positions ticks on a linear or log scale drawn in inline SVG, and every tick has a matching text row so the strip itself is decorative.