A per-seat pricing table built with Bootstrap 6. The "Pro" plan is the obvious choice: it sits in the middle, is taller than its neighbours, uses a dark green surface with gold prices and wears a "Most popular" flag. A team-size slider built with the new Bootstrap 6 Range component recalculates every plan's monthly total. It suits SaaS, agency and studio tool pricing pages.
How it works
The root .php-root has a header with the serif title and a .php-seats box. That box holds a .form-range.theme-success wrapper around input.form-range-input.php-range (1 to 50 seats). A <datalist> connected with the list attribute gives Bootstrap's auto-initialised Range four labelled ticks. An <output class="php-seat-count"> shows the current seat count.
The plans live in .php-plans, a single column on phones. From 768px it becomes a three-column grid, where the outer cards join the middle one into one band. The featured article.php-plan--featured carries data-bs-theme="dark", so Bootstrap's own components inside it, like the btn-solid btn-styled theme-warning button, render in dark mode. Its extra padding makes it overhang the band, and the absolutely positioned .php-flag sits on its top edge.
script.js listens to the slider's input event. For each plan it reads data-seat-price from .php-amount, multiplies it by the seat count, formats it with Intl.NumberFormat and writes it into .php-total. It also updates the output and the slider's aria-valuetext. The featured total gets a short .php-bump pulse.
Customization
data-seat-priceon each.php-amount: sets the per-seat price used for the totals (keep the visible text in sync).min,maxandvalueon.php-range, plus the<option>values in#php-seat-ticks: change the seat range and tick labels.--php-featureand--php-feature-2on.php-root: set the two greens of the highlighted card gradient. These also color the slider and the check icons.--php-goldon.php-root: changes the flag, the featured price and its check icons.--php-serifon.php-root: swap Fraunces for another display font (and update the Google Fonts link).- Move
php-plan--featured,data-bs-theme="dark"and the.php-flagspan to anotherarticleto highlight a different plan. - Change
currencyin theIntl.NumberFormatcall inscript.jsto show euros or pounds.
Use cases
- SaaS tools: the Pro plan is raised, dark green and flagged as Most popular
- Agency and studio pricing: a team-size slider recalculates every plan's monthly total
- Per-seat products: visitors see the real cost for their own team size
- Pricing pages: gold prices on the highlighted card draw attention to the best value
Accessibility
The slider has a real <label>, and aria-valuetext reads "10 seats" instead of a bare number. The <output> is linked with for. Each plan is an article labelled by its heading, and the featured plan is also described by its "Most popular" flag. Icons are aria-hidden. Contrast is kept high on the dark card (gold and off-white on deep green). The total pulse is turned off under prefers-reduced-motion.
Bootstrap 6 notes
Bootstrap 5's <input class="form-range"> is now a .form-range wrapper with an input.form-range-input. It auto-initialises, fills the track through --bs-range-fill and renders datalist ticks. btn-outline-secondary becomes btn-outline theme-secondary, and btn-styled adds the gradient finish to the featured button. Dark mode is scoped per element with data-bs-theme. Built on Bootstrap 6.0.0-alpha.1, so APIs may still change. Icons come from Bootstrap Icons, and the headline font is Fraunces from Google Fonts.