Skip to content
Browse components

StorageForecast

How full a store is, what fills it, and the date it reaches a threshold at the current growth.

vector indexrelay-prod

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

90% reached by Dec 11.

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

No 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.tsx

Usage

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

PropTypeDefaultWhat it does
resourcestring"vector index"What is measured, written as it reads mid-sentence. Shown in capitals at the top left.
namestring"relay-prod"Name of the instance, shown at the top right.
partsreadonly StorageForecastPart[]storageForecastPartsWhat the used storage is made of, in bar order. Their sizes add up to the used total.
capacitynumber64Total capacity.
dailyGrowthnumber1.5Storage added per day.
thresholdnumber90Percent of capacity the forecast runs to.
nextCapacitynumber96Capacity after the next resize.
unitstring"GB"Unit written after sizes.
todayDate | string"2026-12-01"The day the figures were read. The forecast date counts on from it, in UTC.
resizeLabelstring"Resize index"Text on the button.
onResize() => voidNoneCalled when the button is pressed.
labelsPartial<StorageForecastLabels>storageForecastLabelsReplaces the card's wording, key by key.
localestring"en-US"Locale used to format figures and dates.
accentstring"#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