Credit Balance

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

src/registry/ui/credit-balance.tsx/r/credit-balance.json

Installation#

bash
npx shadcn@latest add @minidev/credit-balance

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/credit-balance.json

Usage#

tsx
import { CreditBalance } from "@/components/ui/credit-balance"

export function Example() {
  return (
    <CreditBalance balance="1,240" />
  )
}

API reference#

CreditBalance props
PropTypeDefault
balance*string-
labelstring"Credits"
classNamestring-

* required

Examples#

All pricing and billing components

Learn more