Skip to content

Pricing Table with Feature Tooltips

Bootstrap 5 plan comparison table with a highlighted popular plan and info tooltips that explain every feature on hover or keyboard focus.

Also known as: plan comparison table, pricing comparison table, pricing table with tooltips, feature comparison table, pricing plans table

Pricing Table with Feature Tooltips live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

A Bootstrap 5 pricing comparison table with three plans, a highlighted "Most popular" column and an info button next to every feature that opens a short Bootstrap tooltip. Use it on pricing pages where plan limits such as storage, automations or SSO need a one-line explanation without cluttering the table.

How it works

The root is a section.pft-pricing with a heading and a .table-responsive.pft-wrap box that holds a real table.pft-table. The header row contains one th.pft-plan per plan with the name, the price in .pft-amount, the billing period in .pft-per and a call-to-action button. The middle plan and its body cells carry the .pft-pop class, which tints the whole column and adds the .pft-tag label. Each body row starts with a th scope="row" that holds the feature name and a button.pft-info with data-bs-toggle="tooltip" and the explanation in data-bs-title.

The script runs on DOMContentLoaded for every .pft-pricing. It creates a bootstrap.Tooltip for each trigger, listens for show.bs.tooltip so that only one tooltip is open at a time, and closes all tooltips when Escape is pressed. The button marked with data-pft-open shows its tooltip right after loading, so visitors notice the info icons; it closes on the first click or tap elsewhere. On narrow screens the table scrolls sideways and the feature column stays pinned with position: sticky.

Customization

  • --pft-accent and --pft-accent-soft on .pft-pricing in style.css: change the violet of the buttons, the popular column tint and the hover state of the info icons.
  • Move the .pft-pop class to another plan's th and cells to highlight a different plan.
  • data-bs-title on each .pft-info button: edit the tooltip text; keep it to one or two sentences.
  • Remove data-pft-open from the Version history button if you do not want a tooltip open on page load, or add it to another button.
  • --bs-tooltip-bg and --bs-tooltip-max-width in .pft-tooltip: change the tooltip color and width.
  • Change placement: 'top' in script.js to 'right' to open tooltips beside the icons.
  • Replace the bi-check-circle-fill and bi-dash-lg icons, or the text values in the cells, to match your plans.

Use cases

  • SaaS pricing pages: compare three plans with a highlighted Most popular column
  • Complex plans: an info button next to each feature explains limits such as storage or SSO
  • Product websites: check and dash icons show what each plan includes
  • Mobile visitors: the table scrolls sideways while the feature column stays pinned
  • Keyboard users: tooltips open on focus and close with Escape

Accessibility

The comparison is a semantic table with a hidden caption, column headers and row headers, so screen readers announce the plan and feature for every cell. Check and dash icons are hidden from assistive technology and paired with visually-hidden "Included" or "Not included" text. Info buttons are real button elements with an aria-label; Bootstrap opens their tooltips on hover and on keyboard focus and links them with aria-describedby. Escape closes an open tooltip. The scrollable wrapper is a labelled role="region" with tabindex="0", so keyboard users can scroll it, and all interactive elements have a visible focus outline. Bootstrap's fade animation is disabled when prefers-reduced-motion: reduce is set.

Usage notes

Requires Bootstrap 5 with its JavaScript bundle (added automatically) and Bootstrap Icons. Tooltips are appended to the body, which is why their style lives on the .pft-tooltip custom class set through data-bs-custom-class.

Pricing Table with Feature Tooltips at a glance

Framework
Bootstrap 5
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 5, 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 Table with Feature Tooltips 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 5 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@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/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">
Pricing Table with Feature Tooltips – Bootstrap 5 pricing tables component screenshot
Pricing Table with Feature Tooltips · Bootstrap 5 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.

Pricing with Team Size Range – Bootstrap 6 pricing tables preview

Pricing with Team Size Range

Bootstrap 6 per-seat pricing card with a Range slider for team size, volume tiers, a monthly/annual toggle and a live total price.

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 Comparison Table – Bootstrap 6 pricing tables preview

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.

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.