Pricing Table examples
تین درجوں (tiers) پر مشتمل ایک پرائسنگ سیکشن جس میں ایک نمایاں کردہ تجویز کردہ پلان، فیچرز کی فہرست اور ماہانہ یا سالانہ بلنگ ٹوگل شامل ہے۔
تین کالموں پر مشتمل پرائسنگ سیکشن جس میں ایک نمایاں کردہ تجویز کردہ ٹیر، فی پلان فیچرز کی فہرست، اور ماہانہ یا سالانہ بلنگ ٹوگل شامل ہے۔ موبائل پر پلانز کے لکھے جانے کی ترتیب کے مطابق ایک ہی کالم میں اسٹیک ہو جاتا ہے۔
ایک ویرینٹ میں کام کرنے والا ماہانہ اور سالانہ بلنگ ٹوگل شامل ہے، جو React اور سادہ HTML دونوں میں ہے۔ باقی اسٹیٹک مارک اپ ہیں، جو کہ زیادہ تر ویب سائٹس کو دراصل درکار ہوتا ہے۔
Three-tier pricing table
Starter, Pro, and Enterprise columns with an outlined, badged recommended plan. The recommended plan moves to the top on mobile.
export default function PricingTable() {
return (
<section className="mx-auto max-w-6xl px-4 py-12">
<div className="mb-10 text-center">
<h2 className="text-3xl font-bold text-gray-900">Simple pricing</h2>
<p className="mt-3 text-gray-600">Start free. Upgrade when your team grows.</p>
</div>
<div className="grid gap-6 lg:grid-cols-3">
<div className="relative rounded-xl border border-gray-200 bg-white p-6">
<h3 className="font-semibold text-gray-900">Starter</h3>
<p className="mt-1 text-sm text-gray-600">For side projects.</p>
<p className="mt-4"><span className="text-4xl font-bold text-gray-900">$0</span><span className="text-sm text-gray-600">/month</span></p>
<ul className="mt-6 space-y-3 text-sm text-gray-700">
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>1 project</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Community support</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>1 GB storage</span></li>
</ul>
<a href="#" className="mt-8 block rounded-md px-4 py-2 text-center text-sm font-medium border border-gray-300 text-gray-900 hover:bg-gray-50">Start free</a>
</div>
<div className="relative order-first rounded-xl border-2 border-gray-900 bg-white p-6 lg:order-none">
<span className="absolute -top-3 left-6 rounded-full bg-gray-900 px-3 py-1 text-xs font-medium text-white">Most popular</span>
<h3 className="font-semibold text-gray-900">Pro</h3>
<p className="mt-1 text-sm text-gray-600">For growing teams.</p>
<p className="mt-4"><span className="text-4xl font-bold text-gray-900">$24</span><span className="text-sm text-gray-600">/month</span></p>
<ul className="mt-6 space-y-3 text-sm text-gray-700">
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Unlimited projects</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Priority support</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>100 GB storage</span></li>
</ul>
<a href="#" className="mt-8 block rounded-md px-4 py-2 text-center text-sm font-medium bg-gray-900 text-white hover:bg-gray-700">Start trial</a>
</div>
<div className="relative rounded-xl border border-gray-200 bg-white p-6">
<h3 className="font-semibold text-gray-900">Enterprise</h3>
<p className="mt-1 text-sm text-gray-600">For larger organizations.</p>
<p className="mt-4"><span className="text-4xl font-bold text-gray-900">Custom</span></p>
<ul className="mt-6 space-y-3 text-sm text-gray-700">
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>SSO and audit logs</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Dedicated support</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Custom contracts</span></li>
</ul>
<a href="#" className="mt-8 block rounded-md px-4 py-2 text-center text-sm font-medium border border-gray-300 text-gray-900 hover:bg-gray-50">Contact sales</a>
</div>
</div>
</section>
);
}Pricing table with monthly and annual toggle
The same three tiers with a billing switch that updates prices in place. Buttons carry aria-pressed so the active period is announced.
"use client";
import { useState } from "react";
const plans = [
{
name: "Starter",
tagline: "For side projects.",
monthly: 0,
annual: 0,
features: ["1 project", "Community support", "1 GB storage"],
cta: "Start free",
featured: false,
},
{
name: "Pro",
tagline: "For growing teams.",
monthly: 24,
annual: 19,
features: ["Unlimited projects", "Priority support", "100 GB storage"],
cta: "Start trial",
featured: true,
},
{
name: "Enterprise",
tagline: "For larger organizations.",
monthly: null,
annual: null,
features: ["SSO and audit logs", "Dedicated support", "Custom contracts"],
cta: "Contact sales",
featured: false,
},
];
export default function PricingTable() {
const [annual, setAnnual] = useState(false);
const tab = "rounded-md px-4 py-1.5 text-sm font-medium ";
return (
<section className="mx-auto max-w-6xl px-4 py-12">
<div className="mb-10 text-center">
<h2 className="text-3xl font-bold text-gray-900">Simple pricing</h2>
<p className="mt-3 text-gray-600">Start free. Upgrade when your team grows.</p>
<div
className="mt-6 inline-flex rounded-lg border border-gray-200 p-1"
role="group"
aria-label="Billing period"
>
<button
type="button"
onClick={() => setAnnual(false)}
aria-pressed={!annual}
className={tab + (!annual ? "bg-gray-900 text-white" : "text-gray-600")}
>
Monthly
</button>
<button
type="button"
onClick={() => setAnnual(true)}
aria-pressed={annual}
className={tab + (annual ? "bg-gray-900 text-white" : "text-gray-600")}
>
Annual
</button>
</div>
</div>
<div className="grid gap-6 lg:grid-cols-3">
{plans.map((plan) => {
const price = annual ? plan.annual : plan.monthly;
return (
<div
key={plan.name}
className={
"relative rounded-xl bg-white p-6 " +
(plan.featured
? "order-first border-2 border-gray-900 lg:order-none"
: "border border-gray-200")
}
>
{plan.featured && (
<span className="absolute -top-3 left-6 rounded-full bg-gray-900 px-3 py-1 text-xs font-medium text-white">
Most popular
</span>
)}
<h3 className="font-semibold text-gray-900">{plan.name}</h3>
<p className="mt-1 text-sm text-gray-600">{plan.tagline}</p>
<p className="mt-4">
<span className="text-4xl font-bold text-gray-900">
{price === null ? "Custom" : "$" + price}
</span>
{price !== null && <span className="text-sm text-gray-600">/month</span>}
</p>
<ul className="mt-6 space-y-3 text-sm text-gray-700">
{plan.features.map((feature) => (
<li key={feature}>{feature}</li>
))}
</ul>
<a
href="#"
className={
"mt-8 block rounded-md px-4 py-2 text-center text-sm font-medium " +
(plan.featured
? "bg-gray-900 text-white hover:bg-gray-700"
: "border border-gray-300 text-gray-900 hover:bg-gray-50")
}
>
{plan.cta}
</a>
</div>
);
})}
</div>
</section>
);
}Two-tier pricing table
Free next to paid. Fewer options convert better when the plans are genuinely different rather than incrementally larger.
export default function TwoTierPricing() {
return (
<section className="mx-auto max-w-3xl px-4 py-12">
<div className="mb-10 text-center">
<h2 className="text-3xl font-bold text-gray-900">Two plans. No surprises.</h2>
<p className="mt-3 text-gray-600">Try it free, then pay only when you need more.</p>
</div>
<div className="grid gap-6 md:grid-cols-2">
<div className="relative rounded-xl border border-gray-200 bg-white p-6">
<h3 className="font-semibold text-gray-900">Starter</h3>
<p className="mt-1 text-sm text-gray-600">For side projects.</p>
<p className="mt-4"><span className="text-4xl font-bold text-gray-900">$0</span><span className="text-sm text-gray-600">/month</span></p>
<ul className="mt-6 space-y-3 text-sm text-gray-700">
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>1 project</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Community support</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>1 GB storage</span></li>
</ul>
<a href="#" className="mt-8 block rounded-md px-4 py-2 text-center text-sm font-medium border border-gray-300 text-gray-900 hover:bg-gray-50">Start free</a>
</div>
<div className="relative order-first rounded-xl border-2 border-gray-900 bg-white p-6 lg:order-none">
<span className="absolute -top-3 left-6 rounded-full bg-gray-900 px-3 py-1 text-xs font-medium text-white">Most popular</span>
<h3 className="font-semibold text-gray-900">Pro</h3>
<p className="mt-1 text-sm text-gray-600">For growing teams.</p>
<p className="mt-4"><span className="text-4xl font-bold text-gray-900">$24</span><span className="text-sm text-gray-600">/month</span></p>
<ul className="mt-6 space-y-3 text-sm text-gray-700">
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Unlimited projects</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Priority support</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>100 GB storage</span></li>
</ul>
<a href="#" className="mt-8 block rounded-md px-4 py-2 text-center text-sm font-medium bg-gray-900 text-white hover:bg-gray-700">Start trial</a>
</div>
</div>
</section>
);
}Pricing comparison table
A feature-by-feature table with checks and dashes. Use it when plans share most features and differ in limits. Scrolls sideways on narrow screens.
export default function PricingComparison() {
return (
<section className="mx-auto max-w-4xl px-4 py-12">
<h2 className="text-center text-3xl font-bold text-gray-900">Compare plans</h2>
<div className="mt-8 overflow-x-auto rounded-xl border border-gray-200">
<table className="w-full min-w-[32rem] text-left text-sm">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th scope="col" className="px-4 py-3 font-semibold">Feature</th>
<th scope="col" className="px-4 py-3 text-center font-semibold">Starter</th>
<th scope="col" className="px-4 py-3 text-center font-semibold">Pro</th>
<th scope="col" className="px-4 py-3 text-center font-semibold">Enterprise</th>
</tr>
</thead>
<tbody className="divide-y divide-gray-200 text-gray-700">
<tr>
<th scope="row" className="px-4 py-3 font-medium text-gray-900">Projects</th>
<td className="px-4 py-3 text-center">1</td>
<td className="px-4 py-3 text-center">Unlimited</td>
<td className="px-4 py-3 text-center">Unlimited</td>
</tr>
<tr>
<th scope="row" className="px-4 py-3 font-medium text-gray-900">Storage</th>
<td className="px-4 py-3 text-center">1 GB</td>
<td className="px-4 py-3 text-center">100 GB</td>
<td className="px-4 py-3 text-center">Custom</td>
</tr>
<tr>
<th scope="row" className="px-4 py-3 font-medium text-gray-900">Community support</th>
<td className="px-4 py-3 text-center"><svg className="mx-auto h-5 w-5 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span className="sr-only">Included</span></td>
<td className="px-4 py-3 text-center"><svg className="mx-auto h-5 w-5 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span className="sr-only">Included</span></td>
<td className="px-4 py-3 text-center"><svg className="mx-auto h-5 w-5 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span className="sr-only">Included</span></td>
</tr>
<tr>
<th scope="row" className="px-4 py-3 font-medium text-gray-900">Priority support</th>
<td className="px-4 py-3 text-center"><span aria-hidden="true" className="text-gray-400">-</span><span className="sr-only">Not included</span></td>
<td className="px-4 py-3 text-center"><svg className="mx-auto h-5 w-5 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span className="sr-only">Included</span></td>
<td className="px-4 py-3 text-center"><svg className="mx-auto h-5 w-5 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span className="sr-only">Included</span></td>
</tr>
<tr>
<th scope="row" className="px-4 py-3 font-medium text-gray-900">SSO and audit logs</th>
<td className="px-4 py-3 text-center"><span aria-hidden="true" className="text-gray-400">-</span><span className="sr-only">Not included</span></td>
<td className="px-4 py-3 text-center"><span aria-hidden="true" className="text-gray-400">-</span><span className="sr-only">Not included</span></td>
<td className="px-4 py-3 text-center"><svg className="mx-auto h-5 w-5 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span className="sr-only">Included</span></td>
</tr>
<tr>
<th scope="row" className="px-4 py-3 font-medium text-gray-900">Custom contracts</th>
<td className="px-4 py-3 text-center"><span aria-hidden="true" className="text-gray-400">-</span><span className="sr-only">Not included</span></td>
<td className="px-4 py-3 text-center"><span aria-hidden="true" className="text-gray-400">-</span><span className="sr-only">Not included</span></td>
<td className="px-4 py-3 text-center"><svg className="mx-auto h-5 w-5 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span className="sr-only">Included</span></td>
</tr>
</tbody>
</table>
</div>
</section>
);
}Pricing table with elevated featured plan
The recommended plan is lifted with a shadow and extra height instead of a heavier border, so emphasis comes from depth.
export default function ElevatedPricing() {
return (
<section className="mx-auto max-w-6xl px-4 py-12">
<div className="mb-10 text-center">
<h2 className="text-3xl font-bold text-gray-900">Pricing that scales</h2>
<p className="mt-3 text-gray-600">The Pro plan covers most teams.</p>
</div>
<div className="grid gap-6 lg:grid-cols-3 lg:items-center">
<div className="relative rounded-xl border border-gray-200 bg-white p-6">
<h3 className="font-semibold text-gray-900">Starter</h3>
<p className="mt-1 text-sm text-gray-600">For side projects.</p>
<p className="mt-4"><span className="text-4xl font-bold text-gray-900">$0</span><span className="text-sm text-gray-600">/month</span></p>
<ul className="mt-6 space-y-3 text-sm text-gray-700">
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>1 project</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Community support</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>1 GB storage</span></li>
</ul>
<a href="#" className="mt-8 block rounded-md px-4 py-2 text-center text-sm font-medium border border-gray-300 text-gray-900 hover:bg-gray-50">Start free</a>
</div>
<div className="relative order-first rounded-xl bg-white p-6 shadow-xl ring-1 ring-gray-900/10 lg:order-none lg:-my-4 lg:py-10">
<span className="absolute -top-3 left-6 rounded-full bg-gray-900 px-3 py-1 text-xs font-medium text-white">Most popular</span>
<h3 className="font-semibold text-gray-900">Pro</h3>
<p className="mt-1 text-sm text-gray-600">For growing teams.</p>
<p className="mt-4"><span className="text-4xl font-bold text-gray-900">$24</span><span className="text-sm text-gray-600">/month</span></p>
<ul className="mt-6 space-y-3 text-sm text-gray-700">
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Unlimited projects</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Priority support</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>100 GB storage</span></li>
</ul>
<a href="#" className="mt-8 block rounded-md px-4 py-2 text-center text-sm font-medium bg-gray-900 text-white hover:bg-gray-700">Start trial</a>
</div>
<div className="relative rounded-xl border border-gray-200 bg-white p-6">
<h3 className="font-semibold text-gray-900">Enterprise</h3>
<p className="mt-1 text-sm text-gray-600">For larger organizations.</p>
<p className="mt-4"><span className="text-4xl font-bold text-gray-900">Custom</span></p>
<ul className="mt-6 space-y-3 text-sm text-gray-700">
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>SSO and audit logs</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Dedicated support</span></li>
<li className="flex gap-2"><svg className="h-4 w-4 shrink-0 text-gray-900" fill="none" stroke="currentColor" strokeWidth="1.5" viewBox="0 0 24 24" aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg><span>Custom contracts</span></li>
</ul>
<a href="#" className="mt-8 block rounded-md px-4 py-2 text-center text-sm font-medium border border-gray-300 text-gray-900 hover:bg-gray-50">Contact sales</a>
</div>
</div>
</section>
);
}What is a Pricing Table?
پرائسنگ ٹیبل کسی پروڈکٹ کے پلانز کو برابر میں ترتیب دیتا ہے تاکہ وزیٹر ایک ہی نظر میں ان کا موازنہ کر سکے۔ یہ مارکیٹنگ سیکشن کے بھیس میں ایک کمپیریزن انٹرفیس ہے: اس کا بصری مقصد صاف ستھرا نظر آنا ہے، اور اصل کام ٹیرز کے درمیان فرق کو اتنی جلدی واضح کرنا ہے کہ کوئی شخص سوچنے کے لیے جانے کے بجائے کسی ایک کا انتخاب کر لے۔
اس کی ساخت تقریباً آفاقی ہے کیونکہ یہ کام کرتی ہے۔ ہر کالم میں ایک پلان کا نام، یہ کس کے لیے ہے اس کے بارے میں ایک مختصر سطر، ایک قیمت، شامل چیزوں کی فہرست، اور ایک ایکشن ہوتا ہے۔ ایک تجویز کردہ ٹیر کو عام طور پر الگ سے نمایاں کیا جاتا ہے، جو کہ ایک ڈیزائن آرائش معلوم ہوتی ہے لیکن یہ اصل کام کر رہی ہوتی ہے - بغیر کسی رہنمائی کے تین ملتے جلتے اختیارات دیے جائیں تو لوگ عام طور پر درمیان والے یا کسی کو بھی منتخب نہیں کرتے، اور ایک واضح تجویز غور و فکر کے عمل کو ختم کر دیتی ہے۔
بلنگ ٹوگل واحد حقیقی طور پر انٹرایکティブ حصہ ہے، اور یہ اس لیے موجود ہے کیونکہ سالانہ قیمتوں پر عام طور پر ڈسکاؤنٹ ہوتا ہے۔ سالانہ بلنگ کرتے وقت ماہانہ کے مساوی ڈسکاؤنٹ شدہ رقم دکھانا معمول ہے، لیکن لیبل میں یہ واضح کرنا ضروری ہے کہ کون سا ہندسہ اور کب چارج کیا جا رہا ہے، کیونکہ ظاہر کی گئی رقم اور کسی کے اکاؤنٹ سے درحقیقت نکلنے والی رقم کے درمیان کا فرق ہی وہ جگہ ہے جہاں پرائسنگ پیجز اپنا اعتماد کھو دیتے ہیں۔
یہ سیکشنز زیادہ تر بریک پوائنٹ پر ناکام ہوتے ہیں۔ فیچرز کی فہرست کے تین کالم فون پر تین اسٹیک شدہ بلاکس بن جاتے ہیں، اور تجویز کردہ پلان - جو ڈیسک ٹاپ پر نظر کے لیے احتیاط سے درمیان میں رکھا گیا تھا - باقی دونوں کے درمیان، ایک ایسے فولڈ کے نیچے دفن ہو جاتا ہے جسے زیادہ تر موبائل وزٹرز کبھی سکرول نہیں کرتے۔ پلانز کی ترتیب اس طرح رکھنا کہ تجویز کردہ پلان موبائل پر پہلے نظر آئے، ایک ایسی ون کلاس چینج ہے جسے چھوڑنا آسان اور ضائع کرنا مہنگا پڑتا ہے۔
Anatomy
- Section heading
- کالموں کے اوپر موجود ہیڈنگ اور سپورٹنگ لائن۔ سپورٹنگ لائن کو پلانز کے بارے میں صرف ایک جملے تک محدود رکھیں، کوئی سیلز پیراگراف نہ بنائیں۔
- Billing toggle
- دو بٹن جو یہ بتانے کے لیے aria-pressed استعمال کرتے ہیں کہ کون سا دورانیہ فعال ہے۔ سوئچ کے بجائے بٹن، کیونکہ انتخاب آن اور آف کے بجائے دو نامزد اختیارات کے درمیان ہوتا ہے۔
- Plan card
- ہر ٹیر کے لیے ایک کالم، جو نام، ٹیگ لائن، قیمت، فیچر لسٹ، اور ایکشن پر مشتمل ہوتا ہے۔ تمام کارڈز اندرونی اسپیسنگ ایک جیسی رکھتے ہیں تاکہ قیمتیں اور بٹن کالموں میں ایک سیدھ میں رہیں۔
- Featured badge
- تجویز کردہ پلان پر بالکل پوزیشن شدہ لیبل، جو کارڈ کے اوپر والے کنارے سے تھوڑا ہٹ کر ہوتا ہے تاکہ وہ کنٹین ہونے کے بجائے جڑا ہوا محسوس ہو۔
- Feature list
- ہر پلان کے لیے ایک ul۔ جہاں تک ہو سکے ٹیرز میں آئٹمز کی تعداد برابر رکھیں، ورنہ کالم مختلف اونچائیوں پر ختم ہوں گے اور بٹن سیدھ میں آنا بند ہو جائیں گے۔
- Plan action
- ہر کارڈ کے نیچے موجود بٹن یا لنک۔ تجویز کردہ پلان کو سالڈ ٹรีٹمنٹ ملتا ہے اور باقیوں کو آؤٹ لائنز، تاکہ بصری وزن (visual weight) مطلوبہ راستے سے مطابقت رکھے۔
How to Use
- 1
Copy the version you need
اگر آپ کو کام کرنے والا بلنگ ٹوگل چاہیے تو React والا ورژن لیں، یا صرف ماہانہ کے اسٹیٹک ٹیبل کے لیے HTML ورژن لیں۔
- 2
Edit the plans array
نام، ٹیگ لائنز، قیمتیں، اور فیچرز تبدیل کریں۔ فیچرڈ فلیگ کنٹرول کرتا ہے کہ کس کالم کو بارڈر، بیج، اور سالڈ بٹن ملے گا - اسے بالکل ایک پلان پر سیٹ کریں۔
- 3
Set your annual discount
سالانہ فیلڈ سالانہ بلنگ کی صورت میں ماہانہ کے مساوی قیمت ہے، نہ کہ سالانہ کل رقم۔ بلنگ لیبل میں یہ واضح کریں کہ کون سا ہندسہ چارج کیا جا رہا ہے۔
- 4
Fix the mobile order
نم نمایاں کارڈ میں order-first lg:order-none کا اضافہ کریں تاکہ تجویز کردہ پلان فونز پر سب سے اوپر اور ڈیسک ٹاپ پر درمیان میں نظر آئے۔
- 5
اقدامات کو منسلک کریں
ہر پلان کے لنک کو سائن اپ فلو کی طرف اشارہ کریں جس میں کوئری سسٹرنگ یا پاتھ میں پلان کا شناختی کار (identifier) ہو، تاکہ انتخاب دوبارہ پوچھنے کے بجائے آگے منتقل ہو جائے۔
Features
کام کرنے والا بلنگ ٹوگل
ماہانہ اور سالانہ قیمتیں پیج ری لوڈ کیے بغیر تبدیل ہوتی ہیں، ہر بٹن پر aria-pressed کے ساتھ تاکہ فعال دورانیے کا اعلان کیا جائے نہ کہ صرف دکھایا جائے۔
ڈیٹا پر مبنی کالمز
پورا سیکشن ایک plans ایرے سے رینڈر ہوتا ہے، لہذا کسی ٹیر (tier) کو شامل کرنا یا ہٹانا مارک اپ کی تبدیلی کے بجائے ڈیٹا کی تبدیلی ہے۔
نم نمایاں پلان کا طریقہ کار
ایک واحد بولین (boolean) موٹے بارڈر، بیج، اور سالڈ بٹن کو کنٹرول کرتا ہے، جس سے ہر عنصر پر الگ سے اپلائی کرنے کے بجائے زور دینا مستقل رہتا ہے۔
کالمز میں سیدھ
اندرونی اسپیسنگ قیمتوں، فہرستوں، اور بٹنوں کو ایک ہی افقی لائن پر رکھتی ہے، جو ایک ٹیبل کو پڑھنے کے قابل بناتی ہے نہ کہ صرف صاف ستھرا۔
کسٹম قیمت کی ہینڈلنگ
ایک null قیمت فی مہینہ لاحقہ (suffix) کو چھپاتے ہوئے Custom کے طور پر رینڈر ہوتی ہے، لہذا انٹرپرائز ٹیر کو اپنے الگ مارک اپ کی ضرورت نہیں ہوتی۔
Common Uses
SaaS قیمتوں کے صفحات
سبسکرپشن پروڈکٹ کے لیے معیاری تین درجے کا لے آؤٹ، جس میں مفت یا اسٹارٹر پلان نچلے حصے کو سنبھالتا ہے اور اوپر کی طرف سیلز سے رابطہ کرنے کا ٹیر ہوتا ہے۔
سروس اور ایجنسی کے پیکجز
مقررہ دائرہ کار کے پیکجز پیش کرنا جہاں فرق استعمال کی حد کے بجائے ڈیلیویریبلز کا ہو، درمیانی پیکج کے بطور ارادہ شدہ ڈیفالٹ۔
ممبرشپ اور کورس کے ٹیرز
کسی کمیونٹی، کورس، یا نیوز لیٹر کے لیے رسائی کی سطحیں طے کرنا جہاں سالانہ بلنگ پر خاطر خواہ ڈسکاؤنٹ ملتا ہے۔
پیڈ پلان کا مفت کے ساتھ موازنہ
ایک دو کالموں والا ورژن جو مفت ٹیر کو پیڈ کے ساتھ رکھتا ہے، اور دلیل کے بجائے تضاد کے ذریعے اپ گریڈ کا کیس بناتا ہے۔
Accessibility
- بلنگ ٹوگل سوئچ کے طور پر اسٹائل کیے گئے چیک باکس کے بجائے aria-pressed والے بٹن استعمال کرتا ہے، کیونکہ انتخاب دو نامزد دورانیوں کے درمیان ہے نہ کہ بائنری آن یا آف۔
- پلان کے نام حقیقی سرخی (headings) ہیں، لہذا اسکرین ریڈر استعمال کرنے والا ہر فیچر لسٹ کو سنے بغیر ہیڈنگ نیویگیشن کے ذریعے پلانز کے درمیان جا سکتا ہے۔
- فیچر لسٹیں ul عناصر ہیں، لہذا اشیاء کے پڑھے جانے سے پہلے ان کی لمبائی کا اعلان کیا جاتا ہے اور سننے والا فیصلہ کر سکتا ہے کہ آگے بڑھنا ہے یا نہیں۔
- نم نمایاں بیج کارڈ کے اندر سادہ متن ہے، لہذا اسے سجاوٹی عنصر بننے کے بجائے جو کبھی معاون ٹیکنالوجی تک نہیں پہنچتا، اپنی جگہ پر پڑھا جاتا ہے۔
- ٹوگل پر قیمت کی تبدیلیاں عام ڈاکومنٹ فلو میں ہوتی ہیں۔ اگر آپ کو تبدیلی کا اعلان درکار ہے، تو قیمت کو ایسے کنٹینر میں لپیٹیں جہاں aria-live کو polite پر سیٹ کیا گیا ہو۔
- ہر ایکشن لنک اپنے متن میں یا aria-label میں پلان کا نام رکھتا ہے، تاکہ سیاق و سباق کے بغیر پڑھے جانے والے لنکس کی فہرست تین ایک جیسے اسٹار্ট ٹرائل کے اندراجات پر مشتمل نہ ہو۔
Customization
- نم نمایاں بارڈر، بیج، اور بٹن پر gray-900 کی اقدار کو بدل کر ایکسنٹ تبدیل کریں۔ ان تینوں کو ہمیشہ ایک ساتھ حرکت کرنی چاہیے ورنہ زور دینے کا انداز بگڑ جاتا ہے۔
- ہر پلان کی فہرستوں کی جگہ کارڈز کے نیچے ایک واحد ٹیبل لگا کر موازنہ کے لے آؤٹ پر سوئچ کریں، جو اس وقت بہتر کام کرتا ہے جب پلانز میں فیچرز مشترکہ ہوں اور صرف حدوں میں فرق ہو۔
- سالانہ ٹوگل کے ساتھ بچت کا نوٹ شامل کریں۔ اسے حقیقت پسندانہ رکھیں - ایک فیصد جو گول مول مارکیٹنگ کے اعداد و شمار کے بجائے اصل فرق سے میل کھاتا ہو۔
- اگر آؤٹ لائنز آپ کے ڈیزائن کے لیے بہت زیادہ واضح ہیں، تو ہیوی بارڈر کے بجائے shadow-lg اور lg:-mt-4 کے ساتھ نم نمایاں کارڈ کو اونچائی دیں۔
- تین سے زیادہ ٹیرز کے لیے، موبائل پر لمبے اسٹیک کے بجائے افقی طور پر اسکرول کرنے والی قطار پر جائیں، کیونکہ چار اسٹیک شدہ کارڈ آخری والے کو فولڈ کے بہت نیچے دھکیل دیتے ہیں۔
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| plans * | Plan[] | - | رینڈر کرنے والے ٹیرز۔ ہر ایک کا نام، ٹیگ لائن، ماہانہ اور سالانہ قیمت، فیچرز کی فہرست، اور ایک فیچرڈ فلیگ ہوتا ہے جو نمایاں اسٹائل کو کنٹرول کرتا ہے۔ |
| defaultAnnual | boolean | false | بلنگ کا وہ دورانیہ جس سے ٹوگل شروع ہوتا ہے۔ سالانہ سے شروع کرنے پر کم نمایاں ہندسہ نظر آتا ہے، جسے کچھ ٹیمیں پسند کرتی ہیں اور دوسری ٹیمیں اسے گمراہ کن سمجھتی ہیں - سوچ سمجھ کر انتخاب کریں۔ |
Why Use These Pricing Tables?
بلنگ ٹوگل حقیقی کام کرنے والی اسٹیٹ ہے، نہ کہ کسی ایک کا جامد اسکرین شاٹ۔ زیادہ تر کاپی پیسٹ قیمتوں کے سیکشنز یا تو اسے چھوڑ دیتے ہیں یا اسے غیر فعال سجاوٹ کے طور پر چھوڑ دیتے ہیں جسے پیج لائیو ہونے سے پہلے جوڑنا پڑتا ہے۔
کالمز ڈیٹا ایرے سے رینڈر ہوتے ہیں، لہذا قیمت کی تبدیلی تین متوازی ترامیم کے بجائے ایک ترمیم ہوتی ہے جو کہ قریب قریب ایک جیسے مارک اپ کے بلاکس میں کی جاتی ہے - اور یہی وجہ ہے کہ قیمتوں کے ٹیبلز اپ ڈیٹس کے چند راؤنڈز کے بعد تضاد کا شکار ہو جاتے ہیں۔
موبাইল پر آرڈر کرنے کا مسئلہ دستاویز میں درج ہوتا ہے نہ کہ حیرت کے طور پر چھوڑ دیا جاتا ہے۔ یہ پرائسنگ سیکشنز میں سب سے عام نقص ہے اور اس کا حل صرف ایک کلاس ہے۔
Tips
- order-first lg:order-none کا استعمال کرتے ہوئے موبائل پر تجویز کردہ پلان کو پہلے رکھیں۔ اس کی درمیانی پوزیشن صرف بڑی سکرین پر مدد کرتی ہے؛ سسٹیک ہونے پر، یہ صرف دوسری چیز ہوتی ہے جو سکرول کرتے ہوئے گزرتی ہے۔
- جہاں تک ممکن ہو، تمام پلانز میں فیچر لسٹ کی لمبائی ایک جیسی رکھیں۔ غیر مساوی لسٹیں بٹنوں کو مختلف اونچائیوں پر چھوڑ دیتی ہیں، جو کہ غیر معیاری محسوس ہوتا ہے چاہے کوئی وجہ نہ بتا سکے۔
- ہر فیچر کی شروعات اس بات سے کریں کہ ٹیرز کے درمیان کیا تبدیل ہوتا ہے نہ کہ اس سے کہ ہر ٹیر میں کیا شامل ہے۔ تین کالم جو سب SSL سرٹیفکیٹ سے شروع ہوتے ہیں، سب سے زیادہ پڑھی جانے والی سطر کا ضیاع کرتے ہیں۔
- واضح طور پر بیان کریں کہ آیا سالانہ رقم ماہانہ کے برابر ہے یا سالانہ کل۔ یہ پرائسنگ پیج پر ابہام کی سب سے عام وجہ ہے۔
- چوتھے ٹیر سے گریز کریں جب تک کہ پلانز واقعی الگ نہ ہوں۔ ہر اضافی کالم دوسروں کو تنگ کرتا ہے اور فیصلہ ہٹانے کے بجائے ایک اور اضافہ کرتا ہے۔
- اگر کسی پلان کی استعمال کی حد (usage limit) ہے، تو اسے فوٹر کے بجائے لسٹ میں دکھائیں۔ سائن اپ کے بعد سامنے آنے والی حدود ریفنڈ کی درخواست کا سبب بنتی ہیں۔