ValyroUI Русская версия

Billing Plan Card

Subscription management. Pro · Shop and payments › Subscriptions and plans

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add billing-plan-card
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { BillingPlanCard } from 'valyro-ui-pro';

Props

PropTypeDefault
plan *stringPlan name shown as the card heading.
status'active' | 'trialing' | 'past_due' | 'canceled''active'Subscription state: sets the status badge, the date label and a trial or past-due notice.
price *numberAmount per interval in currency; whole amounts are shown without cents.
currencystring'USD'ISO 4217 code. Default USD.
interval'month' | 'year''month'Billing period, shown after the price.
renewsAtDateInputNext renewal, or the end of access for a canceled plan.
trialEndsAtDateInputEnd of the trial; shows the days left while status is "trialing".
paymentMethodBillingPaymentMethodCard on file, shown masked to its last four digits with the expiry.
usageBillingUsageItem[]Included usage, each shown as a meter.
onUpgrade() => voidAdds a primary Upgrade button ("Upgrade now" during a trial).
onManage() => voidAdds a secondary Manage button.
onCancel() => voidAdds a Cancel plan button, hidden once the plan is canceled.
localestringBCP 47 locale for the price, dates and usage numbers; defaults to the ThemeProvider's.
labelsPartial<BillingPlanCardLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Subscription Manager · Next: Usage Quota · All Shop and payments