WebberUI

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

Free during the launch campaign: sign up or sign in, then hit “Copy install command” in the preview above and it installs straight away — no payment, no credit card. The command below returns 401 while you are signed out.

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.

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

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
<PricingCalculator />

Installation

npx shadcn@latest add "https://webberui.com/r/pricing-calculator.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)
classNamestringForwarded 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

On this page