Tick meter preview

Tick meter

A horizontal progress meter drawn as thin ticks: a solid bar with an end marker, or discrete cells that light up, with an optional headline value, delta and scale.

  • Group
    Charts
  • Origin
    Inspired · Original (this library)
  • License
    MIT
  • Added
    Oct 29
npx shadcn@latest add @deank/tick-meter

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { TickMeter } from "@/registry/components/tick-meter/tick-meter";

<TickMeter value={0} label="…" />

Props

PropTypeDefaultDescription
valuenumber
max?number100
labelstringAccessible name, also shown as the caption above the value
variant?"bar" | "cells""bar"
ticks?numberNumber of ticks (bar) or cells (cells) across the track
color?string"var(--accent)"Fill colour; defaults to the accent
delta?stringSmall text after the headline value, e.g. "+1.2%"
deltaTone?"positive" | "negative" | "neutral""positive"
scale?number[]Values to label under the track, e.g. [0, 25, 50, 75, 100]
showValue?booleantrue
height?number28
formatValue?(v: number, max: number) => string(v, m) => ${((v / m) * 100).toFixed(1)}%

When to use

- Budget used, quota consumed, savings toward a goal, storage full - A dashboard card headline where one percentage needs more texture than a plain progress bar

When not to use

Several values to compare (use bar-chart); progress through steps of a task (use progress-tracker); a circular readout (use gauge); indeterminate work (use a loader).

Related

Gauge · Progress tracker · Donut chart