Import
import { UpgradePrompt, CompactUpgradePrompt } from "@billingos/sdk";
Basic usage
<UpgradePrompt
feature="advanced_analytics"
title="Unlock advanced analytics"
description="Get deeper insights into your data with the Pro plan."
onUpgradeClick={() => router.push("/pricing")}
/>
Unlike UpgradeNudge (which triggers automatically), UpgradePrompt is placed manually wherever you want an upgrade CTA.
Props
The feature that requires an upgrade.
Whether this prompt is shown because a quota was exceeded.
Current usage count (shown when isQuotaExceeded is true).
Usage limit (shown when isQuotaExceeded is true).
Called when the upgrade button is clicked.
CompactUpgradePrompt
A smaller inline variant for toolbars and sidebars.
<CompactUpgradePrompt
feature="export_pdf"
onUpgradeClick={() => router.push("/pricing")}
/>
Props
Examples
As a FeatureGate fallback
<FeatureGate
feature="custom_reports"
fallback={
<UpgradePrompt
feature="custom_reports"
title="Custom reports"
description="Create custom reports with the Pro plan."
onUpgradeClick={() => router.push("/pricing")}
/>
}
>
<ReportBuilder />
</FeatureGate>
Quota exceeded prompt
<UpgradePrompt
isQuotaExceeded={true}
usage={1000}
limit={1000}
title="API call limit reached"
description="Upgrade your plan to continue making API calls."
onUpgradeClick={() => setCheckoutOpen(true)}
/>