shadcn.io is not affiliated with official shadcn/ui
Per-Seat Pricing by Seat Type Block for React
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.
Installation
Overview
Price the people who build, not the people who look, with this seat-type pricing section. Three tiles share one hairline band, one for each kind of seat: Full at $15 a month, Collaborator at $5 and Viewer, which is free. Each has a role icon, a one-line description and a stepper, a minus, the count and a plus built from Button, where a team needs at least one Full seat. Under the tiles, a stacked bar shows the mix of people in three tones of the foreground color, its segments growing and shrinking as the counts change, with a legend that spells out the counts. The fourth cell on a desktop, a sticky bar at the foot of the screen on a phone, holds the monthly total, which rolls to its new amount with Sliding Number, the sum behind it ("3 × $15 + 4 × $5") and a Shine Button, the block's only colored element. The band's lines meet at + marks drawn by Guides, under the page's top rule. Built with Button, Sliding Number, Shine Button, Guides, Lucide icons and Tailwind CSS, with CSS transitions only. For diagramming, design, documentation and any tool with editors, commenters and viewers.
FAQ
How do I change the seat types and prices?
Edit the SEAT_TYPES array at the top of the file: each type has a name, a description, an icon, a price per seat per month (0 for free), the min seats a team needs and the tone of its segment in the bar. START holds the counts the page loads with. The tiles, the bar, the legend, the sum and the total are all worked out from the array, so a fourth type needs no other change; for four tiles on a desktop, widen the grid by one column.
How do I send the seat counts to checkout?
The call to action is a real link, and its screen-reader text includes the head count and the total. It's a ShineButton with render set to an a element and nativeButton={false}. Build its href from counts, for example /checkout?full=3&collaborator=4&viewer=12, and create one subscription item per seat type with its count as the quantity.
Are the steppers accessible?
Yes. Each stepper is a group named for its seat type, with buttons named "Add a Full seat" and "Remove a Full seat" and the count in an output element that announces its changes politely. At the lowest and highest counts the button is marked aria-disabled rather than disabled, so pressing it never moves the keyboard's place, and the count simply stays. The bar is decorative; the legend under it says the same thing in words.
How does the sticky bar work on a phone?
Below the md breakpoint the tiles become compact rows, name and price on the start side, the stepper on the end, and the total cell is position: sticky at the foot of the section, so the total and the call to action stay in reach while the visitor changes counts. It sits inside the section, not fixed to the screen, so it scrolls away with the block. From md it's an ordinary cell in the grid.
Why show free Viewer seats at all?
Because they are the reason the price is fair. A team lead who sees that the designer's manager, the client and the whole sales team can open diagrams for nothing stops counting heads and starts counting builders. Keep the free type's limits honest in the description, and put a count of them in the bar so the mix tells the story.
Related
- Pro
Per-User Pricing as One Sentence
Seats and teamsThe simplest per-user price, said as one giant sentence, '$8 per user, per month.', with a small stepper for the team's users and a monthly total beside it.
- 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
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
Hybrid Seat and Usage Pricing
Seats and teamsOne bill for seats plus metered usage: a seat stepper and an events slider move a two-part bar that splits the total into its fixed and variable parts, with line items and a sticky total on phones.
- Pro
Addon Builder Pricing
CalculatorsA CRM sold as a base plan plus six add-ons that switch on and off in cells sharing hairlines, with the price per seat rolling big beside them and a sticky total bar on phones.