Install the package
Wrap your app with BillingProvider
BillingProvider initializes the Nozle client and makes billing data available to all child components and hooks.app/providers.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Your publishable key (pk_) |
baseUrl | string | 'https://api.nozle.app' | API endpoint |
workspaceId | string | '' | Your workspace ID |
centrifugoUrl | string | undefined | WebSocket URL for real-time entitlement updates |
children | ReactNode | required | Your app content |
Configure Tailwind CSS
Nozle components ship with a Tailwind preset that provides consistent theming out of the box. Add it to your Tailwind config:tailwind.config.js
| Variable | Purpose |
|---|---|
--nozle-primary | Primary accent color |
--nozle-primary-foreground | Text color on primary backgrounds |
--nozle-background | Page background |
--nozle-foreground | Default text color |
--nozle-card | Card background color |
--nozle-border | Border color |
--nozle-muted | Muted background (toggles, disabled states) |
--nozle-muted-foreground | Muted text color |
--nozle-destructive | Error / danger actions |
--nozle-success | Success indicators |
--nozle-warning | Warning indicators |
--nozle-radius | Border radius for components |
PricingTable supports --nozle-pricing-bg, --nozle-pricing-card-bg, --nozle-pricing-highlight, --nozle-pricing-border, and --nozle-pricing-radius — all falling back to their global equivalents.Next steps
- Components — pre-built billing UI components
- Hooks —
useCan,useUsage, and more - Gates — feature gating with React components