shadcn.io is not affiliated with official shadcn/ui
Volume Discount Pricing With a Descending Chart Block for React
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.
Installation
Overview
Show the discount as a shape with this volume-pricing section. A header row sets the line, "Every seat gets cheaper", with a one-line sentence beside it. Below it a hairline band holds two cells. The first is a bar chart of the per-seat price across four brackets, $6, $5, $4 and $3, each bar labelled with its price above and its seat range below; the bar for the bracket most teams land in is solid and the others a light tone of the foreground color. The second is four compact rows, one per bracket, each with its range, a line on how much it saves against the first bracket, its price and a Shine Button. The 11–50 row is tinted, carries a Badge and holds the block's one primary button; the others are outlines. The band's lines meet at + marks drawn by Guides, under the page's top rule. Built with Badge, Shine Button, Guides and Tailwind CSS, as a server component with no client code. For scheduling, seat-based and team products that price by bracket.
FAQ
How do I change the brackets and prices?
Edit the BRACKETS array at the top of the file: each bracket has the seat count it starts at, the seat count it ends at (null for the last), its price per seat, the popular flag and the href of its call to action. The chart's bar heights, the ranges, the savings against the first bracket and the screen-reader text are worked out from the array, so adding a fifth bracket needs only a new entry and a fifth chart column (grid-cols-4 becomes grid-cols-5).
Are the bars drawn to scale?
Yes, from zero: the tallest bar is the first bracket's price and each other bar is its price as a share of it, so $3 is half as tall as $6. A chart that starts above zero would make a saving look bigger than it is. The prices and the ranges are printed on the chart as well as in the rows.
How do I send a bracket to checkout?
Each call to action is a real link to its bracket's href. It's a ShineButton with render set to an a element and nativeButton={false}. Point each one at checkout with the bracket in the address (/checkout?from=11), and let your billing provider price the seats with graduated or volume pricing, so the bracket on the page and the bracket you bill come from one rule.
Is the chart accessible?
The chart is decorative and hidden from assistive technology, because the rows carry the same information as text: every bracket's range as a heading, its saving and its price. Each button's hidden text names its bracket and price ("Choose 11–50 seats at $5 a seat"), so the four "Choose" buttons are distinct. There is no client code in the block, so it works with scripts off.
How does it look on a phone?
The chart sits above the rows and is a little over 170 pixels tall, with the bar labels at a smaller size; the rows follow with their range and saving on the start side and the price and button on the end, so the primary button is well inside the first screen and a half of an iPhone. In right-to-left pages the rows mirror, and the prices and ranges stay left to right.
Related
- Pro
Team Size Slider With Volume Discounts
Seats and teamsA 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.
- Pro
Group Buy Pricing With Email Chips
Seats and teamsA 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
Milestone Discount Pricing
Discounts and offersA slider-driven rate card for usage that gets cheaper at milestones: slide to a monthly volume and the label count rides the thumb, four rate zones show the current one, and the estimate and the next milestone update.
- Pro
Team Tiers With Avatar Clusters
Seats and teamsThree team-size plans, each opening with a cluster of avatars sized to its host range, then its per-host price, a call to action and its features, with a segmented plan switcher on a phone.
- Pro
Tiered API Pricing
Comparison tablesAPI tiers by request quota, with the quota as the headline: four columns open with 10k, 250k, 2M and 10M+ requests a month at display size, then the price, the overage rate and a call to action, over grouped limits and features.
- %Pro
Committed Spend Discount Pricing
Billing switchesFour big commitment chips, $500 to $50k a month, and in the same row the discount each earns at display size, over every unit's committed price against its on-demand price, with the call to action beside the result.