Staaarter

Per-Seat Calculator

A single plan card centers on an interactive seat-count stepper: clicking + or - (or typing directly into the count field) adjusts the number of seats, clamped to a sensible range, and the estimated monthly total recalculates immediately as price-per-seat times seat count.

By Staaarter Team
Pricing
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/per-seat-calculator.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/pricing/pricing11.tsx instead.

Usage

The file also exports pricing11Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Pricing11, pricing11Demo } from "@/components/blocks/pricing/pricing11";

export default function Page() {
  return <Pricing11 {...pricing11Demo} />;
}

Props

PropTypeDefaultDescription
headingReactNodeundefinedCentered headline above the calculator card.
descriptionstringundefinedSupporting subtext below the heading.
planNamestringnoneName of the plan being priced per seat. Required.
pricePerSeatnumbernonePrice for a single seat, used in the live total calculation. Required.
periodstring"/seat/month"Unit label shown next to the per-seat price.
minSeatsnumber1Minimum seat count the stepper allows.
maxSeatsnumber50Maximum seat count the stepper allows.
defaultSeatsnumber5Initial seat count on load, clamped into [minSeats, maxSeats].
featuresstring[]noneFeature list shown below the calculator. Required.
ctaLabelstringnoneLabel for the CTA button. Required.
ctaHrefstringundefinedLink target for the CTA button.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • The stepper is real local state: the +/- buttons (each with a real aria-label, and disabled at the min/max bound) and the number input all update the same seats state via a shared clamp(value, minSeats, maxSeats) helper.
  • The estimated total (seats * pricePerSeat) is computed inline from that state on every render, so it updates the instant the seat count changes, whether from a button click or typing into the field.
  • The seat count field is a real labeled <input type="number">, with an sr-only <Label> for screen readers since the visible 'Number of seats' text next to it is a plain span.
  • The CTA button is an inert placeholder (href defaults to "#" in the demo) with no real checkout wired up.