جدول الأسعار examples
قسم أسعار من ثلاث شرائح بخطة موصى بها مميزة وقوائم ميزات ومفتاح تبديل بين الفوترة الشهرية والسنوية.
قسم أسعار من ثلاثة أعمدة بشريحة موصى بها مميزة وقوائم ميزات لكل خطة ومفتاح تبديل بين الفوترة الشهرية والسنوية. يتراص في عمود واحد على الجوال بترتيب كتابة الخطط.
تتضمن إحدى النسخ مفتاح تبديل شهري وسنوي يعمل فعلًا، بصيغتي 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 جدول الأسعار?
يعرض جدول الأسعار خطط المنتج جنبًا إلى جنب ليتمكن الزائر من مقارنتها بنظرة واحدة. إنه واجهة مقارنة متنكرة في قسم تسويقي: المهمة البصرية أن يبدو نظيفًا، والمهمة الحقيقية أن تكون الفروق بين الشرائح مقروءة بسرعة كافية ليختار الشخص إحداها بدل أن يغادر ليفكر.
البنية شبه عالمية لأنها تنجح. يحمل كل عمود اسم الخطة وسطرًا قصيرًا عمّن تناسبه وسعرًا وقائمة بما يتضمنه وإجراءً. وغالبًا ما تُميَّز شريحة موصى بها، وهذا يبدو لمسة تصميمية لكنه يؤدي عملًا حقيقيًا - فحين تُعطى ثلاثة خيارات متشابهة دون إرشاد يميل الناس عادةً إلى الخيار الأوسط أو إلى لا شيء، والتوصية الصريحة تزيل التردد.
مفتاح التبديل بين الفوترتين هو الجزء التفاعلي الحقيقي الوحيد، وهو موجود لأن التسعير السنوي عادةً مخفَّض. عرض الرقم الشهري المكافئ المخفَّض أثناء الفوترة السنوية معتاد، لكن من المهم أن توضح التسمية أي رقم يُحصَّل ومتى، لأن الفجوة بين الرقم المعروض والمبلغ الذي يغادر حساب الشخص فعلًا هي حيث تفقد صفحات الأسعار الثقة.
وأكثر ما تفشل هذه الأقسام عند نقطة التوقف. تتحول ثلاثة أعمدة من قوائم الميزات إلى ثلاث كتل متراصة على الهاتف، فتنتهي الخطة الموصى بها - الموضوعة بعناية في المنتصف لعين سطح المكتب - مدفونة بين الاثنتين الأخريين، تحت طيّة لا يتخطاها معظم زوار الجوال. وترتيب الخطط بحيث تظهر الموصى بها أولًا على الجوال تغيير بفئة واحدة، يسهل تجاهله ويكلّف غاليًا إن فاتك.
Anatomy
- عنوان القسم
- العنوان والسطر الداعم فوق الأعمدة. اجعل السطر الداعم جملة واحدة عمّن تناسبهم الخطط، لا فقرة مبيعات.
- مفتاح تبديل الفوترة
- زران يحملان aria-pressed للإشارة إلى الفترة النشطة. أزرار لا مفتاح تشغيل، لأن الاختيار بين خيارين مسمّيين لا بين تشغيل وإيقاف.
- بطاقة الخطة
- عمود لكل شريحة، يحمل الاسم والعبارة التعريفية والسعر وقائمة الميزات والإجراء. تتشارك كل البطاقات المسافات الداخلية نفسها لتتراصف الأسعار والأزرار عبر الأعمدة.
- شارة الخطة الموصى بها
- التسمية الموضوعة مطلقًا على الخطة الموصى بها، مزاحة فوق الحافة العلوية للبطاقة لتُقرأ كأنها ملحقة لا محتواة.
- قائمة الميزات
- ul لكل خطة. اجعل عدد العناصر متساويًا عبر الشرائح حيث أمكن، وإلا انتهت الأعمدة بارتفاعات مختلفة وتوقفت الأزرار عن التراصف.
- إجراء الخطة
- الزر أو الرابط في أسفل كل بطاقة. تأخذ الخطة الموصى بها المعالجة الممتلئة وتأخذ الأخرى الإطارات، ليتطابق الوزن البصري مع المسار المقصود.
How to Use
- 1
انسخ النسخة التي تحتاجها
خذ نسخة React إن أردت مفتاح التبديل العامل، أو نسخة HTML لجدول ثابت بالأسعار الشهرية فقط.
- 2
عدّل مصفوفة plans
استبدل الأسماء والعبارات التعريفية والأسعار والميزات. يتحكم علم featured في العمود الذي يحصل على الإطار والشارة والزر الممتلئ - اضبطه على خطة واحدة بالضبط.
- 3
اضبط خصم الاشتراك السنوي
حقل annual هو السعر الشهري المكافئ عند الفوترة سنويًا لا الإجمالي السنوي. اجعل تسمية الفوترة صريحة بشأن الرقم المحصَّل.
- 4
أصلح ترتيب الجوال
أضف order-first lg:order-none إلى البطاقة المميزة لتظهر الخطة الموصى بها في الأعلى على الهواتف وتعود إلى المنتصف على سطح المكتب.
- 5
اربط الإجراءات
وجّه رابط كل خطة إلى مسار التسجيل لديك مع معرّف الخطة في سلسلة الاستعلام أو المسار، ليستمر الاختيار بدل أن يُطلب مرة أخرى.
Features
مفتاح تبديل فوترة عامل
تتبدل الأسعار الشهرية والسنوية دون إعادة تحميل الصفحة، مع aria-pressed على كل زر لتُعلن الفترة النشطة لا أن تُعرض فقط.
أعمدة تعتمد على البيانات
يُعرض القسم كله من مصفوفة plans واحدة، فإضافة شريحة أو إزالتها تغيير في البيانات لا في الشيفرة.
معالجة الخطة المميزة
علم منطقي واحد يتحكم في الإطار الأثقل والشارة والزر الممتلئ، فيبقى التمييز متسقًا بدل أن يُطبَّق يدويًا على كل عنصر.
متراصفة عبر الأعمدة
المسافات الداخلية المشتركة تُبقي الأسعار والقوائم والأزرار على الخطوط الأفقية نفسها، وهو ما يجعل الجدول قابلًا للتصفح لا مجرد مرتب.
معالجة السعر المخصص
السعر null يُعرض كـ Custom مع إلغاء لاحقة كل شهر، فلا تحتاج الشريحة المؤسسية إلى شيفرة منفصلة.
Common Uses
صفحات أسعار SaaS
التخطيط القياسي من ثلاث شرائح لمنتج اشتراكي، بخطة مجانية أو مبتدئة تثبّت الطرف الأدنى وشريحة تواصل مع المبيعات في الأعلى.
حزم الخدمات والوكالات
عرض حزم ثابتة النطاق حيث الفروق هي المخرجات لا حدود الاستخدام، مع الحزمة الوسطى كخيار مقصود افتراضيًا.
شرائح العضوية والدورات
عرض مستويات الوصول لمجتمع أو دورة أو نشرة بريدية حيث تحمل الفوترة السنوية خصمًا ذا معنى.
مقارنة خطة مدفوعة بخطة مجانية
نسخة من عمودين تضع الشريحة المجانية بجوار المدفوعة، فتقدّم حجة الترقية بالتباين لا بالجدال.
Accessibility
- يستخدم مفتاح تبديل الفوترة أزرارًا مع aria-pressed بدل مربع اختيار منسّق كمفتاح، لأن الاختيار بين فترتين مسمّاتين لا ثنائية تشغيل وإيقاف.
- أسماء الخطط عناوين حقيقية، فيستطيع مستخدم قارئ الشاشة التنقل بين الخطط بالتنقل بالعناوين بدل الاستماع إلى كل قائمة ميزات.
- قوائم الميزات عناصر ul، فيُعلن طولها قبل قراءة العناصر ويستطيع المستمع أن يقرر ما إذا كان سيتجاوزها.
- شارة الخطة الموصى بها نص عادي داخل البطاقة، فتُقرأ في موضعها بدل أن تكون عنصرًا زخرفيًا لا يصل إلى التقنيات المساعدة.
- تتغير الأسعار عند التبديل في تدفق المستند العادي. وإن احتجت أن يُعلن التغيير فغلّف السعر في حاوية بـ aria-live مضبوط على polite.
- يحمل كل رابط إجراء اسم الخطة في نصه أو في aria-label، فلا تتكون قائمة روابط مقروءة خارج سياقها من ثلاثة إدخالات متطابقة هي ابدأ التجربة.
Customization
- غيّر اللون المميز باستبدال قيم gray-900 على إطار الخطة المميزة والشارة والزر. ينبغي أن تتحرك هذه الثلاثة معًا دائمًا وإلا تفكك التمييز.
- انتقل إلى تخطيط مقارنة باستبدال قوائم كل خطة بجدول واحد تحت البطاقات، وهو أفضل حين تتشارك الخطط الميزات وتختلف في الحدود فقط.
- أضف ملاحظة توفير بجوار مفتاح التبديل السنوي. اجعلها واقعية - نسبة مئوية تطابق الفرق الفعلي لا رقمًا تسويقيًا مقرّبًا للأعلى.
- امنح البطاقة المميزة ارتفاعًا بـ shadow-lg وlg:-mt-4 بدل إطار أثقل، إن كانت الحدود صاخبة جدًا لتصميمك.
- لأكثر من ثلاث شرائح، انتقل إلى صف قابل للتمرير أفقيًا على الجوال بدل تراص أطول، لأن أربع بطاقات متراصة تدفع الأخيرة بعيدًا تحت الطيّة.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| plans * | Plan[] | - | الشرائح المراد عرضها. تحمل كل منها اسمًا وعبارة تعريفية وسعرًا شهريًا وسنويًا وقائمة ميزات وعلم featured يتحكم في المعالجة المميزة. |
| defaultAnnual | boolean | false | فترة الفوترة التي يبدأ عندها مفتاح التبديل. البدء بالسنوي يعرض رقمًا رئيسيًا أقل، يفضله بعض الفرق ويعده آخرون مضللًا - فاختر عن قصد. |
Why Use These جدول الأسعارs?
مفتاح التبديل حالة حقيقية عاملة لا لقطة ثابتة لأحد وضعيه. تحذف معظم أقسام الأسعار الجاهزة المفتاح أو تتركه زخرفة معطلة تحتاج إلى ربط قبل أن تُطلق الصفحة.
تُعرض الأعمدة من مصفوفة بيانات، فتغيير السعر تعديل واحد بدل ثلاثة تعديلات متوازية عبر كتل شيفرة شبه متطابقة - وهكذا تنتهي جداول الأسعار غير متسقة بعد بضع جولات من التحديث.
مشكلة ترتيب الجوال موثقة لا مفاجأة تُترك. إنها العيب الأكثر شيوعًا في أقسام الأسعار وإصلاحها فئة واحدة.
Tips
- ضع الخطة الموصى بها أولًا على الجوال بـ order-first lg:order-none. موضعها الأوسط يفيد على الشاشة العريضة فقط؛ وحين تتراص لا تكون سوى ثاني شيء يُتجاوز بالتمرير.
- اجعل قوائم الميزات بالطول نفسه عبر الخطط حيث تستطيع بصدق. القوائم غير المتساوية تترك الأزرار بارتفاعات مختلفة، وهذا يبدو مهملًا حتى لو لم يستطع أحد تحديد السبب.
- ابدأ كل ميزة بما يتغير بين الشرائح لا بما تتضمنه كل شريحة. ثلاثة أعمدة تبدأ كلها بـ شهادة SSL تهدر السطر الأكثر قراءة.
- وضّح ما إذا كان الرقم السنوي هو المكافئ الشهري أم الإجمالي السنوي. هذا أكثر مصادر الحيرة شيوعًا في صفحات الأسعار.
- تجنب شريحة رابعة ما لم تكن الخطط متمايزة فعلًا. كل عمود إضافي يضيّق الباقي ويضيف قرارًا بدل أن يزيل واحدًا.
- إن كان لخطة حد استخدام فأظهره في القائمة لا في حاشية. الحدود التي تُكتشف بعد التسجيل طلب استرداد ينتظر الحدوث.