Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

OKR Target Cards Stats Block for React

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.

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

An OKR board for React with Base UI. A centred header states how far the quarter's objectives have got ("This quarter's objectives are 67% complete"), and under it three cards sit a little apart, each with lines that run past its corners. A card is one objective: its owner, a large completion percent that rolls up once when it scrolls into view, and three key results nested under it, each with current / target text and a bar of how far it has come. A closing line names the key result furthest from its target. An objective's percent is the mean of its key results' whole percents, so you can check it by hand, and a key result that wants a number to fall (launch time, support tickets) is measured from where it started to its target. Every percent, mean and name is computed from one typed list of objectives. It's built from Progress, SlidingNumber and Guides, with the bars in your theme's foreground colour. Three across from lg, a stack of three below it.

FAQ

How do I change the objectives and key results?

Edit OBJECTIVES at the top of the file: an objective is a title, an owner and its keyResults. A key result has a label, a current figure, a target, a from (where it stood when the quarter began) and a write function that formats a reading ("$41.6K", "620 ms"). The percents, the mean per objective, the quarter's headline and each card's closing line are computed from the list.

How does a key result that has to go down get a percent?

Its from is above its target. Progress is (current - from) / (target - from), clamped to 0 to 100, so median launch time from 900 ms to a target of 450 ms, now at 620 ms, is 62%. A number that climbs from nothing has a from of 0. The label should say which way the number has to go, as "Support tickets per 100 new teams" does with its figures (14 now, 8 to reach).

Is the big percent a plain average?

It is the mean of the three key results' whole percents, rounded, so what you read on the card adds up. The headline's percent is the mean of the objectives' percents in the same way.

Is it accessible?

Yes. Each objective is a list item with a heading, and its key results are a nested list. Every bar is named with its label, its figures and its percent ("Teams enrolled in the beta: 1,420 of 1,500, 95%"), and the figures are also text next to it. Values sit in bdi elements so a right-to-left page doesn't reorder "$41.6K / $60.0K". Contrast passes in light and dark. The bar takes an aria-label.

How does it fit on a phone?

The three cards stack, one per row, each with the same layout as on a desktop. Nothing scrolls sideways at 320 pixels.

What moves?

The header and the cards fade up once on load, and each objective's percent rolls up the first time it scrolls into view. The bars show their final width from the start. With reduced motion everything 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

    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

    Quota Tile Grid Stats

    Goals and progress

    Six plan-quota tiles (seats, API calls, storage, projects, bandwidth, builds) with used against limit, a bar, what is left and a reset hint in days; a tile at 90% or more gets a solid bar and an Upgrade link badge.

  • Pro

    Goal Ring Tiles Stats

    Goals and progress

    Four goal tiles for an OKR tool, each a thin ring with the part done drawn solid, the part today's pace will add drawn lighter after it and a tick for the target, with the projected finish in words.

  • Pro

    Quota attainment for a regional sales team, three regions in an accordion whose trigger shows the rolled-up bar and whose panel lists each territory.

  • 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.