Import
import { UsageDisplay, CompactUsageDisplay } from "@billingos/sdk";
Basic usage
<UsageDisplay featureKey="api_calls" />
Renders a progress bar showing current usage vs the plan limit, with a reset timer.
Props
Show usage for a specific feature. Omit to show all metered features.
Custom title above the usage display.
Show when the usage counter resets.
CompactUsageDisplay
A smaller variant for inline use (e.g., in headers or sidebars).
<CompactUsageDisplay featureKey="api_calls" />
Props
The feature key to display usage for.
Examples
All features
<UsageDisplay title="Your usage" />
<aside>
<CompactUsageDisplay featureKey="api_calls" />
<CompactUsageDisplay featureKey="storage_gb" />
</aside>
Custom styled
<UsageDisplay
featureKey="team_members"
title="Team members"
showResetTimer={false}
className="bg-gray-50 rounded-lg p-4"
/>