Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Bullet Chart Stats Block for React

Four bullet graphs for department KPIs, each with three shaded ranges, a bar for the result, a tall tick for the target, a labelled scale and a verdict with a glyph and words.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Bullet graphs for React with Base UI. A start-aligned header says how many of four KPIs met their target, "1 of 4 department KPIs met their target in Q3", and a framed figure holds four rows. Each row puts the KPI's name, team, value and a verdict at the start and the bullet graph at the end: three shaded ranges (darker is worse), a thin bar for the quarter's result, a tall tick for the target and a labelled scale. The verdict is a check and "Target met" or a dash and "Short of target", and the one KPI deep in its poor range gets a warning status with the words "In the poor range". Two KPIs are better when lower, so their ranges run the other way. The ranges, the bar, the verdicts and the headline are computed at module scope from each KPI's readings. On a phone the bullet moves under the text. For OKR reviews, department scorecards and any result against a goal.

FAQ

How do I change the KPIs?

Edit KPIS at the top of the file. Each has a name and team, the result (actual), the target, two thresholds in bounds between the poor, fair and good ranges, the min and max of the scale, the ticks to label, whether lower is better, and a write function that formats a number. The ranges, the bar, the tick, the verdict, the gap in the text and the headline are computed from those.

How do KPIs where lower is better work?

Set lower: true. The result then meets its target at or under it, the poor range is the one at the end of the scale, and the ranges' tints flip so the darkest tint is still the worst. The verdict and the gap ("7 days over") are computed from the result and the target, so the words are always true whichever way a KPI runs.

When does the warning status appear?

Only when a result lands in its poor range, the one real alert in the set. The warning dot sits beside a triangle and the words "In the poor range", so it never relies on colour. Every other verdict is a check or a dash in the text colour with its words, which keeps the block readable in any theme and in print.

Is it accessible?

The bullets are hidden from assistive technology because every row says the same in text: the KPI, its team, the value, the verdict, the target and the gap. The rows are a list with a heading each, values sit in bdi elements, and the scale is forced left to right so it grows from the start in every language.

What changes on a phone?

Each row stacks: the name, team, value and verdict first, then the bullet at full width with its scale. The scale labels drop to every other tick. The bar grows from the start once on load; with reduced motion it simply appears.

  • Pro

    Goal Target Tile Grid Stats

    Goals and progress

    Four regional goal tiles for a sales team, each a count of targets met and a bar of five segments, solid for met, outlined for the next, with a hint row that names the next market and its value.

  • Pro

    Fourteen daily bars against a labelled quota line in a framed chart, days at or above the quota solid and days below it outlined, with a two-cell band under it for days met and the average against the quota.

  • Pro

    Five support metrics, each on a scale line with three markers (your team as a solid dot, the industry average as a ring, the top 10% as a tick), a verdict with a glyph and words, and the three values as text.

  • Pro

    Four delivery-target tiles you can filter with a segmented control (All, Watch, At risk) that dims the others, each with a bar marked at its watch and at-risk thresholds and a state in a glyph and a word.

  • Pro

    OKR Target Cards Stats

    Goals and progress

    Three objective cards for an OKR tool, each with a large completion percent that is the mean of its three key results, nested key-result bars with current and target, and a line naming the key result furthest from its goal.

  • Pro

    Target Ratio Progress Stats

    Goals and progress

    Five team rows led by a booked-over-quota ratio at display size, each with a bar along the row's floor and the share and the gap written at the end.