shadcn.io is not affiliated with official shadcn/ui
Capacity Threshold Progress Stats Block for React
Cloud capacity for an infrastructure team, resource bars whose fill weight steps at 70 and 90, with a status mark on anything past 90.
Installation
Overview
Capacity progress for React with Base UI. Capwatch, a cluster desk, shows six resources in one framed grid. Each cell is the resource, what it is using against its limit, and a Progress bar. The bar's length is the true percent. Its weight is the tier: under 70 the fill is drawn at 50% of the text colour, from 70 through 90 at 75%, and past 90 at full strength with a destructive Status dot and the words "Near limit". A key of three swatches sits in the header. The heading counts the resources past 90, from the same rows. The block has no state: it's Guides, Progress, Status and CSS transitions for the entrance. For the numbers section of an infrastructure or platform page.
FAQ
How do I change the resources?
Edit RESOURCES at the top of the file. Each row is a label, a used, a limit and a unit (an empty unit prints a bare ratio, 34 / 100). The percent, the weight, the "Near limit" mark and the heading's count are all computed from used and limit.
How do the three weights get chosen?
The length is always the rounded percent. The ink is separate. Under 70 it is the text colour at 50%. From 70 through 90, including 70 and 90 themselves, it is the text colour at 75%. Past 90 it is the text colour at full strength. In the sample, API CPU and worker CPU are light, Postgres disk and Redis memory are the middle weight, and egress and the queue are full.
Why isn't a hot resource red?
The weight already says which tier a resource is in, and the words "Near limit" say which ones need a person. A red bar would be a second code, and it fails in a theme that doesn't use red that way. The only status colour is the destructive dot, and only on a resource past 90.
Why does the key have no status dot?
The dot means one thing: this resource is past 90. The key explains the three weights, so it uses the same three swatches as the bars and the words "Over 90, near limit". Putting a third dot in the key would look like a third alert. The heading's count and the two cells are the only places the status appears, and both are derived, so they can't disagree.
Related
- Pro
Progress Bar List Stats
Goals and progressSix launch milestones in one hairline frame, each with its owner and due week, its count against the target, the percentage and a Progress bar, under a headline that counts the milestones done.
- Pro
Quota Tile Grid Stats
Goals and progressSix 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
Threshold Target Cards Stats
Goals and progressFour 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
Accordion Region Progress Stats
Goals and progressQuota 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
Goal Status Board Stats
Goals and progressA rail-to-rail status board for sales pace: four cells that lead with a state word and a glyph, Ahead, On pace, Behind or Missed, three figures each, and a legend row that defines the four glyphs.
- Pro
Dense Checklist Progress Stats
Goals and progressA dense onboarding checklist for a customer-success tool, ten steps in a three-part row beside a summary of how far new accounts get.