Xzero UI
Pro library

Pricing calculatorPro

A seat slider and billing toggle drive plan cards with rolling prices and a moving recommended badge.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/pricing-calculator
Live · keyboard ready

Use this as a starting point and replace the sample data with your own.

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui-pro/pricing-calculator

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { PricingCalculator } from "@/components/xzero/blocks/pricing-calculator/pricing-calculator";

export function PricingPage() {
  return <PricingCalculator />;
}

API reference

PricingCalculator

A seat based pricing section. A slider picks team size from fixed seat stops, a billing toggle switches monthly and yearly, and three plan cards update prices, totals, volume discounts, and features live. The recommended plan follows the seat count. Plans and prices are constants in the file; the trial is simulated. Also the default export.

No props.

Keyboard interactions

KeysAction
Arrow keys / Home / End / Page Up / Page DownNative range input: moves between seat stops.
Arrow keysIn the billing toggle, switch between monthly and yearly and move focus with the selection.
Enter / SpaceChooses a plan, steps seats with the plus and minus buttons, and starts the trial.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Guidance for AI tools

Blocks are complete, self-contained screens with sample data. Replace the sample data and connect the callbacks described above. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components