A per-seat pricing card for SaaS pages, built with Bootstrap 6. Visitors drag a Range slider to their team size, and the card picks the volume tier, applies the annual discount and updates the total, yearly bill and savings badge live.
How it works
The root .tsr-root holds a two-column .tsr-card. The left .tsr-config column contains the seat slider. It is a .form-range.theme-success wrapper around an input.form-range-input (1 to 100 seats) with a linked <datalist>, which Bootstrap turns into labelled tick marks. Below it sit a Monthly/Annual radio toggle made of .btn-check labels in a .btn-group, and the three .tsr-tier cards. The right .tsr-summary column shows the plan name, the .tsr-amount total, a breakdown line, the .tsr-savings badge, the feature list and the call to action.
script.js imports Range from the Bootstrap bundle. It disposes the instance the data API created and re-creates it with bubble: true and a formatter, so the value bubble reads "24 seats" instead of "24". On every input event of the slider and every change of the billing radios, update() finds the tier in the TIERS array. It then calculates the per-seat price (minus ANNUAL_DISCOUNT for yearly billing) and writes the totals into the summary. It also marks the current .tsr-tier with .is-current and aria-current. At the maximum value the root gets .is-enterprise, which highlights the "Talk to sales" line.
Customization
TIERSinscript.js: change the tier names, the first seat of each tier (min) and the per-seatprice. Update the.tsr-tiertext to match.ANNUAL_DISCOUNTinscript.js: set the yearly discount (0.2 = 20%). Change the.tsr-save-chiplabel too.min,maxandvalueon#tsr-seat-range: set the seat range and the starting team size. Edit the<datalist>options to move or relabel the ticks.--tsr-brand,--tsr-brand-darkand--tsr-accenton.tsr-root: recolor the slider, the summary panel and the lime highlights. The root also maps Bootstrap's--bs-success-*tokens to these colors.--bs-range-track-heightand--bs-range-thumb-widthon.tsr-range: make the slider track and thumb thicker or thinner.- The
formatterpassed toRange.getOrCreateInstance(): change the bubble text, for example to "24 users".
Use cases
- SaaS pricing pages: visitors drag a slider to their team size and see the per-seat price and total
- Collaboration and project tools: volume tiers show how the price per seat drops as the team grows
- Annual versus monthly offers: the billing toggle applies the yearly discount and shows a savings badge
- Enterprise sales funnels: the maximum slider value highlights a talk to sales line for large teams
Accessibility
The slider has a real <label>, help text via aria-describedby, and an aria-valuetext such as "24 seats, Team plan, $192 per month", so screen readers announce more than a number. The total uses aria-live="polite". The billing toggle is a labelled radio group that works with arrow keys. The bubble and ticks are aria-hidden. Focus outlines are visible on the slider, toggle, links and button, and the tier transitions are off under prefers-reduced-motion.
Bootstrap 6 notes
Bootstrap 5's .form-range class on the input becomes a .form-range wrapper with an inner .form-range-input. Bootstrap 6 adds the filled track, the data-bs-bubble value bubble and datalist ticks. btn-outline-success is now btn-outline theme-success, and .btn-check moves onto the label that wraps the radio. text-bg-success badges become badge badge-subtle theme-success. Built on Bootstrap 6.0.0-alpha.1, so APIs may still change. Icons come from Bootstrap Icons.