Marketing Showcase Blocks

Pricing Calculator

An interactive pricing section that computes the monthly bill live from a usage slider and recommends a plan automatically.

This is a WebberUI Pro component

The install command below needs a licence to run; without one it returns 401.

How to install Pro components →See the plans →

Drag the usage slider to compute each plan's monthly price live: the price figures roll and update on a spring, the "Recommended" badge automatically jumps to the right plan card and highlights it once usage crosses a threshold, switching to annual billing applies the discount, and the cost breakdown at the bottom reveals line by line — a good fit for a SaaS pricing page.

Bring this into your project

Run this command in your project folder. The CLI adds the source and dependencies; then follow the usage example below.

npx webberui@latest add "https://webberui.com/r/pricing-calculator.en.json?t=<install token>"

New project or installation trouble? Start here →

Playground

Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.

50
8
0.8
Active edited usageDefault props
<PricingCalculator/>

The complete example includes the preview layout and data. Install the component first, then paste this file into your project.

Installation

npx webberui@latest add "https://webberui.com/r/pricing-calculator.en.json?t=<install token>"

Or, once registries are configured in components.json, install it as @webberui/pricing-calculator.

Usage

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

<PricingCalculator
  min={1}
  max={50}
  defaultValue={8}
  yearlyDiscount={0.8}
  tiers={[
    {
      name: "Starter",
      description: "For small teams getting started",
      basePrice: 0,
      perUnit: 150,
      upTo: 5,
      features: ["3 projects", "Basic analytics"],
    },
    {
      name: "Pro",
      description: "For growing teams",
      basePrice: 600,
      perUnit: 120,
      upTo: null,
      features: ["Unlimited projects", "Advanced analytics"],
    },
  ]}
/>

Props

PropTypeDefaultDescription
tiersPricingTier[]—Plan configuration, sorted by usage threshold from low to high
minnumber1Minimum usage on the slider
maxnumber50Maximum usage on the slider
stepnumber1Slider step value
defaultValuenumber8Default usage
unitLabelstring"seats"Label for the usage unit
currencystring"NT$"Currency symbol prefix
yearlyDiscountnumber0.8Annual billing discount multiplier (0.8 = 20% off)
classNamestring—Forwarded to the outermost container

PricingTier fields:

FieldTypeDescription
namestringPlan name
descriptionstringOne-sentence plan description
basePricenumberBase monthly fee
perUnitnumberAdditional monthly charge per unit
upTonumber | nullRecommended usage ceiling; above it the next plan is recommended. null means no ceiling
featuresstring[]List of plan highlights

Accessibility

  • The slider is a native input[type="range"], adjustable with the keyboard arrow keys, and carries an aria-label and aria-valuetext (including the unit)
  • The monthly / annual toggle is a set of buttons inside a role="group", expressing the current state through aria-pressed
  • The monthly total sits in an aria-live="polite" region, so assistive technology announces the new price whenever usage or the billing period changes
  • When the user has "reduce motion" enabled at the system level, the price figures jump straight to their final value and the card scaling, badge movement, and breakdown reveal animations are all disabled
  • Decorative icons (Users, Check, Sparkles) are all marked aria-hidden