Ballmac UI home

Capacity 1: runway

How long until each resource runs out: usage against the limit as a meter, growth per day, the days of runway written as words, the soonest first, a button to ask for more, and a plain 'Not growing' for resources that are not.

State

The normal view. Pick a state to see what the block shows while it loads, is empty or fails.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/capacity-1

Usage

Example: capacity-1-demo.tsx
"use client"

import { Capacity1 } from "@/components/ballmac/blocks/capacity-1/capacity-1"

export default function Capacity1Demo() {
  return <Capacity1 onRequest={() => new Promise((r) => setTimeout(r, 500))} />
}

States

Pass state and the block does the rest: skeletons that match its layout, a clear empty message, an error you can retry, and announcements for screen readers.

  • Loading

    Skeleton rows under the real heading, announced as loading.

    state="loading"
  • No resources tracked

    Says no resources tracked; emptyState sets the copy.

    state="empty"
  • Could not load

    An alert saying nothing was changed, with Try again (onRetry). A request that fails says why.

    state="error"

Dependencies

Use with AI

Capacity runway. <Capacity1 resources={[{ id, name, unit, used, limit, perDay, where? }]} urgentDays={14} planDays={60} onRequest={(resource) => Promise} />. Runway = (limit - used) / perDay, shown as 'Full in about 14 days'; perDay of zero or less says 'Not growing'. Urgent and plan-soon resources come first and offer Ask for more. Exports runway. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Capacity 1: runway (@ballmac/capacity-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Planning storage, connections or throughput before they run out
  • An infrastructure review with a clear next action

Not for

  • Spend; use cost-1
  • Reliability targets; use slo-1

Registry JSON: https://ui.ballmac.com/r/capacity-1.json

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.