Pricing
Pricing card with a monthly and yearly toggle; the price rolls to the new number while a bright edge wipes through the dot grid behind it.
Playground
Change a prop and the component updates. Props marked live animate to the new value; the others rebuild the element.
<HfPricing
plan="Pro"
monthly={20}
yearly={16}
period="yearly"
currency="€"
features="Ultracode and multi-agent workflows|Priority access at peak times|Projects with shared context"
/>Installation
pnpm dlx shadcn@latest add @lumesec/hf-pricingFirst timeRegister the @lumesec registry once, or install by URL+
Adds @lumesec to your components.json:
pnpm dlx shadcn@latest registry add @lumesec=https://elements.lumesec.ai/r/{name}.jsonOr skip the setup and install by URL:
npx shadcn@latest add https://elements.lumesec.ai/r/hf-pricing.jsonUsage
import { HfPricing } from "@/components/lumesec/hf-pricing";
export function Example() {
return (
<HfPricing plan="Pro" monthly={20} yearly={16} />
);
}Behaviour
Switching billing period rolls the price to the new number while a bright edge wipes through the dot grid behind it.
API reference
Attributes
planReact propplanTypestringDefaultProPlan name above the price.
monthlyReact propmonthlyTypenumberDefault20Price per month on monthly billing.
yearlyReact propyearlyTypenumberDefault16Price per month on yearly billing. The note under the price shows twelve times this value.
periodReact propperiodTypemonthly | yearlyDefaultyearlyInitial billing period. Any value other than monthly selects yearly.
currencyReact propcurrencyTypestringDefault€Currency symbol placed before the price.
featuresReact propfeaturesTypestringDefaultUltracode and multi-agent workflows|Priority access at peak times|Projects with shared contextFeature list, separated by |.
Events
Events bubble and cross the shadow boundary unless the description says otherwise.
changeReact proponChangeDetail{ period: "monthly" | "yearly", price: number }Fires when the user switches billing period. price is the per-month price for that period.
Properties
price (read-only)TypenumberPer-month price for the selected period, read from monthly or yearly.
Accessibility
- The billing toggle is a
role="radiogroup"labelledBilling period, with two native buttons carryingrole="radio"andaria-checked. Both buttons are tab stops; there is no arrow-key handling. - The price is text in the monospace font with tabular figures. The price row (rolling price,
/ monthand the dot canvas) isaria-hidden; a visually hiddenaria-live="polite"region carries the price and period instead, for example€16 per month, billed yearly. - Reduced motion: the price and the billing note swap without rolling and the grid shows no wipe.
Theming
The element reads your shadcn theme tokens through its shadow root, so light and dark follow your theme. The accent comes from --lumesec. See Theming.
This component reads --card, --foreground, --lumesec, --lumesec-success, --muted and --muted-foreground.
To restyle only LumeSec elements, set the matching --ui-* overrides: --ui-accent, --ui-fg, --ui-mono, --ui-muted, --ui-ok, --ui-surface and --ui-track.
Notes
- The
−20%badge on Yearly is fixed text and is not computed frommonthlyandyearly. - The call to action is a nested
<hf-button>labelledStart free trialwith no handler; its clicks bubble out of the host.hf-pricingimportshf-buttonitself. - Attributes are read on first connect and are not observed;
monthly,yearlyandcurrencyare re-read when the period changes.
Related
Was this page helpful?