Stripe products
Admin product list where each "Show on pricing page" switch adds or removes the plan from a live pricing preview, and Sync from Stripe flags what changed.
Installation
Installation is available on the Startup and Business plans. Your personal install command appears here once you have access.
Usage
Import it, pass your props, and make it part of your product.
import { StripeProducts } from '@/components/component-kit/items/block-stripe-products';
export function Example() { return <StripeProducts onToggleVisibility={(product, visible) => console.log(product.id, visible)} />;}Props
| Prop | Type | Default | Description |
|---|---|---|---|
products | BillingProduct[] | 4 demo products | Products with id, name, description, monthly price, active and visible. |
currency | string | "$" | Symbol shown in front of prices. |
onToggleVisibility | (product: BillingProduct, visible: boolean) => void | undefined | Called when a product is shown on or hidden from the pricing page. |
onSync | () => Promise<BillingProduct[]> | void | undefined | Resolve with the refreshed list; the demo applies a price change and a new product. |
compact | boolean | false | Pricing preview and two products, for small previews. |
autoPlay | boolean | false | Toggle one product's visibility on a loop. |