Catman · Stock
Weeks of cover
How many weeks the stock on hand lasts at the current rate of sale, on a track against the band the buyer wants it in: short is a stockout risk, over is cash on a shelf.
@twelfth/weeks-of-coverui@twelfth/market-side@twelfth/retail-format
18 wks6 wks over
Examples
Every state
Short1.5 wks2.5 wks short
In band6 wksIn band
Over18 wks6 wks over
Off the track›40 wks28 wks over
No net salesNo net sales
Aged stock line
No lower bound: anything past 26 weeks is aged cash.
41 wks15 wks over
Dense, for a table cell
›34 wks
Installation
1. Add the block. It brings what it builds on (
market-side,retail-format) with it.terminalnpx shadcn@latest add https://ui.twelfth.ai/r/weeks-of-cover.json2. Optional: register the namespace in
components.jsonto writenpx shadcn add @twelfth/weeks-of-coverfrom then on.components.json{ "registries": { "@twelfth": "https://ui.twelfth.ai/r/{name}.json" } }
API reference
WeeksOfCover
| Prop | Type | Default | Description |
|---|---|---|---|
| weeks* | number | null | — | Saleable units ÷ weekly rate of sale. null when nothing sold. |
| max* | number | — | Top of the healthy band. |
| min | number | 0 | Bottom of the band, e.g. lead time plus safety stock. |
| scale | number | max × 1.5 | Weeks the track spans; beyond it the figure reads ›. |
| showState | boolean | true | Say "6 wks over" beside the figure. |
Notes
- role="meter" with the value, band and state in its label.
