CreditBalance shows how many credits a customer has in one credit system, and the grants and top-ups they come from. From React 0.11.0.
When to use
- Next to an AI or credit-metered feature, so customers see what is left.
- The credits section of your billing settings, with
CreditHistorybelow it. - Any place that shows what remains of each grant or top-up and when it expires.
- Light
- Dark
- Minimal
- Neobrutal
- Nozle
- Nozle Dark

Importing CreditBalance
Rendering CreditBalance
Inside aBillingProvider with billingEndpoint, read the balance with useCreditBalance and pass it in:
app/billing/credits/page.tsx
Data
balance is a CreditBalanceData. Credit amounts are decimal strings.
Live data
Inside aBillingProvider with billingEndpoint, useCreditBalance(creditSystemCode?) returns one balance of the signed-in customer: the given credit system, else the first one with credits, else the first one.
credits.balance result, read on your backend.
Source types
Each source’stype sets its label. A source type the component does not know shows as sent. Sources whose remaining is "0" are hidden.
Examples
Loading, empty and error
isLoading shows a loading placeholder, no balance shows emptyMessage, and error shows the message as an alert.

API reference
CreditBalanceData | null
null or no value shows the empty message.boolean
default:false
Shows a loading placeholder.
Error | string | null
Shows the message as an alert. Defaults to
null.string
default:"No credit balance yet."
Shown when there is no balance.
Appearance
Theme, variables and element overrides. Defaults to the provider’s. See Appearance.
en-US (“Oct 16, 2026”).
States
Appearance
Element keys
Element keys
creditBalance (root), creditBalance__amount (the large number).Style them with appearance.elements. See Elements.Related
CreditHistory
How credits were used and granted.
Credits
How credit systems work.




