SolutionsCase StudiesAI ToolsResourcesAboutContact
Get Your Free AI Automation Audit Book a Free 30-Minute Strategy Call
Playground~/frontend Open editor

~/css/tailwind-pricing-sections

6 Tailwind Pricing Sections

4 Tailwind2 with JSPublished 2026-10-05Free · no sign-up

Six pricing page sections: a monthly or yearly toggle, a feature comparison table, a single-plan card, selectable plan rows, a per-seat price calculator and a contact-sales band for larger customers.

01. Tailwind Pricing Section with Billing Toggle

TailwindPricingToggle

A pricing header with a monthly or yearly switch made of two radio buttons styled as a pill. A small script swaps the prices, and the yearly option shows the saving in words.

View code
<section class="w-full max-w-xs text-center">
  <h3 class="text-2xl font-black text-slate-900">Simple pricing</h3>
  <fieldset class="mx-auto mt-3 inline-flex rounded-full bg-slate-200 p-1 text-sm font-semibold">
    <legend class="sr-only">Billing period</legend>
    <label class="cursor-pointer rounded-full px-4 py-1.5 text-slate-700 has-[:checked]:bg-white has-[:checked]:text-slate-900 has-[:checked]:shadow has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-indigo-600"><input type="radio" name="twps1" value="m" class="sr-only" checked>Monthly</label>
    <label class="cursor-pointer rounded-full px-4 py-1.5 text-slate-700 has-[:checked]:bg-white has-[:checked]:text-slate-900 has-[:checked]:shadow has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-indigo-600"><input type="radio" name="twps1" value="y" class="sr-only">Yearly <span class="text-emerald-700">−20%</span></label>
  </fieldset>
  <div class="mt-4 rounded-2xl bg-white p-5 text-left shadow-sm ring-1 ring-slate-200"><p class="font-bold text-slate-900">Studio</p><p class="mt-1"><span id="twps1p" class="text-3xl font-black text-slate-900">$30</span> <span id="twps1u" class="text-sm text-slate-600">per month</span></p></div>
</section>
document.querySelectorAll('input[name=twps1]').forEach(function (r) { r.onchange = function () { var y = r.value === 'y'; document.getElementById('twps1p').textContent = y ? '$288' : '$30'; document.getElementById('twps1u').textContent = y ? 'per year' : 'per month'; }; });

02. Tailwind Plan Comparison Table

TailwindPricingTable

A feature comparison across three plans as a real table, with ticks and dashes paired with hidden text so screen readers hear Included or Not included. The table scrolls sideways inside a focusable region on small screens.

View code
<div role="region" aria-label="Compare plans" tabindex="0" class="w-full max-w-xs overflow-x-auto rounded-2xl bg-white ring-1 ring-slate-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-indigo-600">
  <table class="w-full min-w-[300px] text-sm">
    <thead><tr class="border-b border-slate-200"><th scope="col" class="p-3 text-left font-semibold text-slate-600">Feature</th><th scope="col" class="p-3 font-bold text-slate-900">Free</th><th scope="col" class="p-3 font-bold text-indigo-700">Pro</th><th scope="col" class="p-3 font-bold text-slate-900">Team</th></tr></thead>
    <tbody class="divide-y divide-slate-100 text-center text-slate-700">
      <tr><th scope="row" class="p-3 text-left font-normal">Projects</th><td class="p-3">3</td><td class="p-3">Unlimited</td><td class="p-3">Unlimited</td></tr>
      <tr><th scope="row" class="p-3 text-left font-normal">Custom domain</th><td class="p-3"><span aria-hidden="true">—</span><span class="sr-only">Not included</span></td><td class="p-3 text-emerald-700"><span aria-hidden="true">✓</span><span class="sr-only">Included</span></td><td class="p-3 text-emerald-700"><span aria-hidden="true">✓</span><span class="sr-only">Included</span></td></tr>
      <tr><th scope="row" class="p-3 text-left font-normal">Shared billing</th><td class="p-3"><span aria-hidden="true">—</span><span class="sr-only">Not included</span></td><td class="p-3"><span aria-hidden="true">—</span><span class="sr-only">Not included</span></td><td class="p-3 text-emerald-700"><span aria-hidden="true">✓</span><span class="sr-only">Included</span></td></tr>
    </tbody>
  </table>
</div>

03. Tailwind Single-Plan Pricing Section

TailwindPricingSingle

When there is only one plan, the section can be one strong card: the price large, a short feature list with ticks and one button. A ring in the brand colour lifts it off the dark background.

View code
<section class="w-full max-w-xs rounded-3xl bg-slate-900 p-6 ring-2 ring-indigo-500">
  <p class="text-sm font-semibold text-indigo-300">Everything included</p>
  <p class="mt-2 text-4xl font-black text-white">$19<span class="text-base font-medium text-slate-400"> / month</span></p>
  <ul class="mt-4 grid gap-2 text-sm text-slate-200"><li><span aria-hidden="true" class="text-emerald-400">✓ </span>Unlimited pages</li><li><span aria-hidden="true" class="text-emerald-400">✓ </span>Custom domain</li><li><span aria-hidden="true" class="text-emerald-400">✓ </span>Email support</li></ul>
  <a href="#buy" class="mt-5 block rounded-xl bg-indigo-500 py-3 text-center font-bold text-white hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-300">Start 14-day trial</a>
</section>

04. Tailwind Plan Picker Rows

TailwindPricingRadio

Plans as a list of selectable rows, each a label wrapping a radio button, styled for the checked state with has-[:checked]. A compact pattern for checkout pages and narrow sidebars.

View code
<fieldset class="grid w-full max-w-xs gap-2">
  <legend class="mb-1 font-bold text-slate-900">Choose a plan</legend>
  <label class="flex cursor-pointer items-center justify-between rounded-xl border border-slate-300 bg-white p-3 has-[:checked]:border-indigo-600 has-[:checked]:bg-indigo-50 has-[:checked]:ring-1 has-[:checked]:ring-indigo-600"><span class="flex items-center gap-3"><input type="radio" name="twps4" class="size-4 accent-indigo-600"><span><b class="block text-sm text-slate-900">Starter</b><span class="text-xs text-slate-600">1 store</span></span></span><span class="text-sm font-bold text-slate-900">$9</span></label>
  <label class="flex cursor-pointer items-center justify-between rounded-xl border border-slate-300 bg-white p-3 has-[:checked]:border-indigo-600 has-[:checked]:bg-indigo-50 has-[:checked]:ring-1 has-[:checked]:ring-indigo-600"><span class="flex items-center gap-3"><input type="radio" name="twps4" class="size-4 accent-indigo-600" checked><span><b class="block text-sm text-slate-900">Growth</b><span class="text-xs text-slate-600">3 stores</span></span></span><span class="text-sm font-bold text-slate-900">$29</span></label>
  <label class="flex cursor-pointer items-center justify-between rounded-xl border border-slate-300 bg-white p-3 has-[:checked]:border-indigo-600 has-[:checked]:bg-indigo-50 has-[:checked]:ring-1 has-[:checked]:ring-indigo-600"><span class="flex items-center gap-3"><input type="radio" name="twps4" class="size-4 accent-indigo-600"><span><b class="block text-sm text-slate-900">Scale</b><span class="text-xs text-slate-600">10 stores</span></span></span><span class="text-sm font-bold text-slate-900">$79</span></label>
</fieldset>

05. Tailwind Per-Seat Price Calculator

TailwindPricingCalculator

A pricing block where a slider sets the number of seats and the monthly total updates as you drag. The total sits in an output element tied to the slider, and the per-seat price is stated plainly.

View code
<section class="w-full max-w-xs rounded-2xl bg-white p-5 shadow-sm ring-1 ring-slate-200">
  <div class="flex justify-between text-sm font-semibold text-slate-800"><label for="twps5">Team size</label><span><span id="twps5n">5</span> seats</span></div>
  <input id="twps5" type="range" min="1" max="50" value="5" class="mt-2 w-full accent-indigo-600">
  <p class="mt-3 text-sm text-slate-600">$8 per seat, per month</p>
  <p class="mt-1 text-3xl font-black text-slate-900"><output id="twps5t" for="twps5">$40</output><span class="text-base font-medium text-slate-600"> / month</span></p>
</section>
var r = document.getElementById('twps5');
r.oninput = function () { document.getElementById('twps5n').textContent = r.value; document.getElementById('twps5t').textContent = '$' + r.value * 8; };

06. Tailwind Contact Sales Band

TailwindPricingCTA

The strip under the plans for larger customers: a short pitch, a few bullet points and a Talk to sales button, laid out with flex-wrap so the button drops under the text on narrow screens.

View code
<section class="flex w-full max-w-sm flex-wrap items-center justify-between gap-4 rounded-2xl bg-slate-900 p-5 text-white">
  <div class="min-w-0 flex-[1_1_12rem]"><h3 class="text-lg font-bold">Need more than 50 seats?</h3><p class="mt-1 text-sm text-slate-300">Volume pricing, invoicing and a named contact.</p></div>
  <a href="#sales" class="rounded-lg bg-white px-4 py-2 text-sm font-semibold text-slate-900 hover:bg-slate-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white">Talk to sales</a>
</section>

About these Tailwind Pricing Sections

Toggles are radios

A billing switch is a choice between options, so build it from radio buttons in a fieldset and style the checked label with has-[:checked]:.

Ticks need words

In comparison tables, pair each tick or dash with hidden text such as Included or Not included.

Say the unit

Write per month, per year or per seat next to every price; a bare number invites wrong guesses.

Tables on phones

Keep comparison tables as tables and let them scroll sideways inside a labelled, focusable region.

Frequently asked questions

Where are the pricing cards?

See the Tailwind pricing tables collection for plan cards.

Do the prices update with JavaScript?

The toggle and calculator use a few lines of script; the rest are static.

Is there a CSS version?

Yes, see the CSS pricing sections collection.