Skip to content

Pricing Comparison Table

Bootstrap 6 feature comparison table across four plans with check icons, a highlighted Pro column, tooltips, a sticky feature column and an Only differences filter.

Also known as: plan comparison table, feature comparison table, pricing comparison chart, compare plans table

Pricing Comparison Table live demo

Open in new tab

Bootstrap 6 code (HTML, CSS, JS)

A detailed plan comparison table built with Bootstrap 6. It lists four plans side by side, marks included features with green check icons and missing ones with a dash, and highlights the recommended "Pro" column. A segmented control hides the rows that are identical in every plan.

How it works

The root .pct-root contains a header row and a Bootstrap 6 .table-card wrapper around a focusable .table-responsive region. Inside is table.table.pct-table. The header row holds the plan name, price and a call-to-action button for each plan. The body is split into groups by tr.pct-group rows. Values are plain text or icons with role="img" and an aria-label ("Included" / "Not included").

The Pro column cells carry .pct-hl, which paints a tinted background and draws a continuous border with inset box shadows. .pct-hl-top closes the frame at the top. The first column is position: sticky, so on phones the feature names stay visible while the plans scroll sideways.

The filter is a .btn-group of two Bootstrap 6 toggle labels (label.btn-check with the radio input inside). On load, script.js compares the value of every td in a row and stores the result in data-pct-same. When "Only differences" is chosen, those rows get the hidden attribute. Group headings with no visible rows are hidden too, and .pct-status reports how many rows were hidden. The .pct-info buttons use data-bs-toggle="tooltip", which Bootstrap 6 initialises on first hover or focus, with no setup code.

Customization

  • --pct-hl and --pct-hl-edge on .pct-root: change the fill and outline of the highlighted column. Move .pct-hl to other cells to highlight a different plan.
  • --pct-yes and --pct-no on .pct-root: recolor the check and dash icons.
  • --bs-info-bg, --bs-info-fg and --bs-info-border on .pct-root: re-map the info role used by the filter, badge and plan buttons.
  • --pct-feature-width on .pct-root: sets the width of the sticky feature column (9.5rem on phones, 15rem from 768px).
  • data-bs-title on any .pct-info button: edits its tooltip text. Copy the button into other feature cells to add more hints.

Use cases

  • SaaS pricing pages: four plans side by side with check icons for included features
  • Software vendors: the recommended Pro column is highlighted for visitors
  • Plan comparison: an Only differences filter hides rows that are identical in every plan
  • Long feature lists: a sticky feature column keeps labels visible when the table scrolls

Accessibility

The table has a visually hidden caption, column headers with scope="col", row headers with scope="row" and group headers with scope="rowgroup". Icon cells expose their meaning through aria-label. The scroll region is focusable, labelled by the heading and shows a focus outline, so keyboard users can scroll it with the arrow keys. Tooltip triggers are real buttons with aria-labels and open on focus. Filter changes are announced through role="status".

Bootstrap 6 notes

Bootstrap 5's table-primary row colors are replaced by theme-* classes. table-card is a new rounded wrapper. Toggle buttons now put the input inside label.btn-check btn-outline theme-info, with no id/for pairs. Tooltips auto-initialise, so the old new bootstrap.Tooltip() loop is gone. Buttons use btn-solid, btn-outline and btn-subtle with a theme class, and badge theme-info replaces badge bg-info. Built on Bootstrap 6.0.0-alpha.1, so details may still change. Icons come from Bootstrap Icons.

Pricing Comparison Table at a glance

Framework
Bootstrap 6
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 6, Bootstrap Icons
Layout
Responsive, works on mobile
Category
Pricing Tables
License
Free for personal and commercial use

Questions about this template

Can I use the Pricing Comparison Table code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 6 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/css/bootstrap.min.css">
  • <script type="module" src="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">

Built for Bootstrap 6.0.0-alpha.1. Bootstrap 6 ships as an ES module, so its script and this component's JavaScript load with type="module". Alpha releases can still change before the stable version.

Pricing Comparison Table – Bootstrap 6 pricing tables component screenshot
Pricing Comparison Table · Bootstrap 6 Pricing Tables

More Pricing Tables

Pricing Cards with Billing Toggle – Bootstrap 5 pricing tables preview

Pricing Cards with Billing Toggle

Bootstrap 5 pricing cards with a Monthly / Annual segmented switch that updates prices, savings and yearly totals, plus a highlighted featured plan.

Dark Pricing Section – Bootstrap 6 pricing tables preview

Dark Pricing Section

Dark Bootstrap 6 pricing section with three glass cards, a gradient-bordered recommended plan, a currency Menu and an FAQ link that opens a Drawer with an accordion.

Pricing Table with Highlighted Plan – Bootstrap 6 pricing tables preview

Pricing Table with Highlighted Plan

Bootstrap 6 pricing cards with a raised dark green Most popular plan, gold accents and a team-size Range slider that recalculates every plan's monthly total.

Pricing Table with Monthly Yearly Toggle – Bootstrap 6 pricing tables preview

Pricing Table with Monthly Yearly Toggle

Bootstrap 6 three-tier pricing table with a monthly/yearly billing switch that updates every price and billing note, plus a save badge and a popular plan.

Pricing Plan Comparison Table – WordPress pricing tables preview

Pricing Plan Comparison Table

A pricing plan comparison table for the block editor that compares three plans across eight features in a striped table, with prices in the header and plan buttons below.

Three-Tier Pricing Table with Highlighted Plan – WordPress pricing tables preview

Three-Tier Pricing Table with Highlighted Plan

A three-tier pricing table for the block editor with Starter, Pro and Business plans, a highlighted dark Pro plan card, feature lists and full-width buttons.