Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Team Size Slider With Volume Discounts Block for React

A seat calculator: a slider sets the team size with its count riding the thumb, ticks at the 10, 25 and 50 seat discounts, shortcuts to them, and a panel that rolls the seat price and monthly total.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Let buyers size their own team with this seat-calculator pricing section. A header row says the price, $14 a seat and less as you grow, with three shortcut buttons at its end that jump to the discount steps: 10 seats at 10% off, 25 at 20% and 50 at 30%. Below it, a card in a card (Frame) holds two panels. In the first, a Slider from 1 to 100 seats has the chosen count riding its thumb in large type, rolling to each new number with Sliding Number, and under the track a tick for each discount step, in the foreground color once the team has reached it. The second panel shows the seat price, the struck list price with a Badge for the percentage off, and the monthly total, both rolling, over a Shine Button that names the seat count, the block's only colored element. On a phone that panel becomes a bar at the foot of the section with the total and the button. The page's top rule is drawn by Guides. Built with Frame, Slider, Sliding Number, Badge, Button, Shine Button, Guides and Tailwind CSS, with CSS transitions only. For design tools, collaboration apps and any seat-priced product with volume discounts.

FAQ

How do I change the price, the range and the discounts?

Edit the constants at the top of the file. LIST_PRICE is the monthly price of one seat, MIN_SEATS and MAX_SEATS are the ends of the slider, START_SEATS is where it opens, and DISCOUNTS lists the seat count each discount starts at and its percentage. The ticks under the track, the shortcut buttons, the discount badge, the seat price and the total are all computed from them, so they can't disagree. Amounts are rounded to the cent, so 30 seats at 20% off are $336.00 and a total never carries a stray fraction of a cent.

How do I send the seat count to checkout?

The call to action is a real link and its text follows the seat count. It's a ShineButton with render set to an a element and nativeButton={false}. Build its href from seats, for example /checkout?seats=24, and create the subscription with a per-unit price and that quantity. Let your billing provider apply the discount from the quantity, so the price you show and the price you charge come from one rule.

Is the calculator accessible?

Yes. The slider is named "Seats on your team" and reads its value in words ("24 seats"), and it moves with the arrow keys, Page Up and Page Down, Home and End. The shortcuts are buttons named for their step ("10 seats, 10% off") that report whether they are the current choice. Once a drag or a key press ends, a polite live region says the seat count, the discount, the seat price and the total, so a screen reader hears it once rather than at every step. The large riding number and the ticks repeat that information, so they're hidden from assistive technology.

How does it work on a phone?

The header's shortcuts move under the sentence, and the slider's panel comes first with its count riding the thumb. The total and the call to action sit in a bar that sticks to the foot of the section while the visitor drags, so the number they're changing and the button are always on screen together. The bar scrolls away with the block; it isn't fixed to the page. In right-to-left pages the slider, the ticks and the riding count mirror.

Why a slider instead of a table of discount tiers?

A table makes visitors do arithmetic: find your bracket, multiply, remember the discount. A slider answers the only question they have, what will my team pay, and the ticks show where the next saving starts, so someone at 9 seats sees that one more seat lowers the price of all ten. Keep the table when your brackets are the story, as in the volume discount block.

  • Pro

    Per-seat pricing that falls across four team-size brackets, drawn as a descending bar chart beside compact rows with the saving on each bracket and a call to action per row.

  • Pro

    A group-buy price: add teammates' emails as chips and the per-seat price steps down at 5, 10 and 25 seats, with a bar to the next drop, a live monthly total and a stack of the team.

  • Pro

    Seat-type pricing with a stepper for each type: Full, Collaborator and Viewer seats at different prices, a stacked bar of the seat mix, a live monthly total and, on a phone, a sticky total bar.

  • Pro

    A usage-based bill calculator for a search API: a slider over monthly search volumes sits in one short band, and a meter of what the plan covers and what is billed as overage rolls the estimated bill beside it.

  • Pro

    A split pricing section for a VPN with a contract length slider from 1 to 24 months in a card in a card, where the monthly price at display size, the discount, total and savings roll to each term, and a sticky bar on phones.

  • Pro

    A sliding scale for nonprofits: a price slider from free to the list price, the chosen price riding its thumb, shortcuts to the minimum, suggested and supporter prices, and a line on what that price funds.