Usage Meter
Single usage meter with a label, used over limit count and a Progress bar linked by aria-labelledby. Handy for API calls, storage or seats on billing pages.
src/registry/ui/usage-meter.tsx/r/usage-meter.json
Installation#
bash
npx shadcn@latest add @minidev/usage-meter
MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/usage-meter.json
Usage#
tsx
import { UsageMeter } from "@/components/ui/usage-meter"
export function Example() {
return (
<UsageMeter label="Seats" used={3} limit={5} />
)
}
API reference#
| Prop | Type | Default |
|---|---|---|
label* | string | - |
used* | number | - |
limit* | number | - |
className | string | - |
* required
Dependencies#
npm
React only
Built from
Examples#
Related billing components#
Add Card FormCompact payment form for card number, expiry and CVC with correct autocomplete hints, numeric input mode and a full width save button. Ready for your processor.Billing AddressTailwind billing address fieldset with a multiline street field and a responsive row for city, state and postal code. Drops into checkout forms.Cancel FlowTwo step subscription cancellation flow: ask for a reason with radio options, then confirm with a destructive button or go back. Tells users what they keep.Comparison TablePlan comparison table with features as rows and plans as columns, showing check or dash icons for booleans and text for values. Scrolls on mobile.Credit BalanceCompact credit balance pill with a small label and a large tabular figure. Shows remaining credits or usage balance for AI and pay-as-you-go apps.Downgrade WarningTailwind plan downgrade warning card with an amber border, a summary of what gets locked on the free plan, and Keep plan or Downgrade buttons.
All pricing and billing components