StorageForecast
How full a store is, what fills it, and the date it reaches a threshold at the current growth.
Your vector index holds 42 GB
of 64 GB. At 1.5 GB/day it
reaches 90% on Dec 11, then
scales to 96 GB.
0Today 4264 GB
Embeddings 31.5Metadata 6.3Cache 4.2Free 22.0
Installation
Run this in a project that has a components.json. It adds one file, components/tenor-ui/storage-forecast.tsx, and no packages.
pnpm dlx shadcn@latest add https://tenor.design/r/storage-forecast.jsonNo components.json? Fetch the file. It works in any React project.
curl --create-dirs -o src/components/tenor-ui/storage-forecast.tsx https://tenor.design/r/storage-forecast.tsxUsage
Every prop is optional. With none, it renders the content you see above.
<StorageForecast />import { StorageForecast } from "@/components/tenor-ui/storage-forecast";
export function IndexStorage({ onResize }: { onResize: () => void }) {
return (
<StorageForecast
resource="search index"
name="catalog-eu"
parts={[
{ label: "Documents", size: 118 },
{ label: "Vectors", size: 64.5 },
{ label: "Logs", size: 9.5 },
]}
capacity={256}
dailyGrowth={2.4}
threshold={85}
nextCapacity={512}
today="2026-12-01"
resizeLabel="Resize index"
onResize={onResize}
/>
);
}Props
| Prop | Type | Default | What it does |
|---|---|---|---|
resource | string | "vector index" | What is measured, written as it reads mid-sentence. Shown in capitals at the top left. |
name | string | "relay-prod" | Name of the instance, shown at the top right. |
parts | readonly StorageForecastPart[] | storageForecastParts | What the used storage is made of, in bar order. Their sizes add up to the used total. |
capacity | number | 64 | Total capacity. |
dailyGrowth | number | 1.5 | Storage added per day. |
threshold | number | 90 | Percent of capacity the forecast runs to. |
nextCapacity | number | 96 | Capacity after the next resize. |
unit | string | "GB" | Unit written after sizes. |
today | Date | string | "2026-12-01" | The day the figures were read. The forecast date counts on from it, in UTC. |
resizeLabel | string | "Resize index" | Text on the button. |
onResize | () => void | None | Called when the button is pressed. |
labels | Partial<StorageForecastLabels> | storageForecastLabels | Replaces the card's wording, key by key. |
locale | string | "en-US" | Locale used to format figures and dates. |
accent | string | "#30C653" | Colour of the projection, the forecast date and the threshold marker. |
theme | "dark" | "light" | "dark" | Colour palette. |
It also takes every attribute of its root element, such as className and style.
Theming
Set any of these CSS variables on the component or on an ancestor. Each falls back to the look shown here.
--tui-surface--tui-stroke--tui-text--tui-muted--tui-faint--tui-control--tui-control-hover--tui-accent--tui-font-sans--tui-font-mono