Skip to main content

Import

Basic usage

Displays an upgrade prompt when usage data indicates the user should upgrade. Supports three display styles. Upgrade nudge

Props

NudgeTrigger
required
The nudge trigger data, typically from the checkUsage() API response.
'banner' | 'toast' | 'modal'
default:"'banner'"
Display style:
  • banner — Top banner, non-intrusive
  • toast — Bottom-right notification
  • modal — Centered dialog, more prominent
number
default:"0"
Auto-dismiss after N milliseconds. 0 means no auto-dismiss.
(priceId: string) => void
Called when the user clicks the upgrade button.
() => void
Called when the user dismisses the nudge.
'light' | 'dark'
Color theme.

Example: Auto-check and show nudge