Components › Blocks

Plan usage

The current plan with a meter per limit that warns near the limit and turns red at it.

Installation

npx plankui@latest add plan-usage

Usage

import { PlanUsage } from "@/components/ui/plan-usage";

<PlanUsage plan="Team" price="$29 a month" usage={[{ label: "Seats", used: 7, limit: 10 }]} actions={<Button>Upgrade</Button>} />

API reference

PropTypeDefaultDescription
planstringrequiredThe plan's name.
price / renewsstringThe price and renewal lines.
usage{ label, used, limit, unit? }[]requiredOne meter per limit; 80% warns, 100% is danger.
actionsReactNodeButtons such as Upgrade.

View the source on GitHub