Compact Pricing Table
Compact pricing comparison table with Feature, Growth, and Enterprise columns and checkmark rows. Minimal light table for enterprise landing pages, scrollable on mobile with overflow-x-auto wrapper.
Dependencies
react
npm install react react-domexport function CompactPricingTable() {
const rows = [
["Custom domains", "✓", "✓"],
["Analytics", "—", "✓"],
["SLA", "—", "✓"],
];
return (
<div className="overflow-x-auto rounded-xl border border-zinc-200">
<table className="w-full min-w-[320px] text-left text-sm">
<thead className="bg-zinc-50 text-zinc-600">
<tr><th className="p-3">Feature</th><th className="p-3">Growth</th><th className="p-3">Enterprise</th></tr>
</thead>
<tbody>
{rows.map(([f, a, b]) => (
<tr key={f} className="border-t border-zinc-100"><td className="p-3 font-medium">{f}</td><td className="p-3">{a}</td><td className="p-3">{b}</td></tr>
))}
</tbody>
</table>
</div>
);
}
Please implement this code in the current project and add it to (Your Desired Section, e.g. homepage hero, pricing page, dashboard). Change the primary accent color to (YOUR HEX CODE COLOR, e.g. #6366F1).
Requirements:
- Use React + Tailwind CSS (match the project's existing setup)
- Install dependencies if needed: npm install react react-dom
- Keep the layout responsive on mobile and desktop
- Replace placeholder copy with content that fits the project
The UI code:
export function CompactPricingTable() {
const rows = [
["Custom domains", "✓", "✓"],
["Analytics", "—", "✓"],
["SLA", "—", "✓"],
];
return (
<div className="overflow-x-auto rounded-xl border border-zinc-200">
<table className="w-full min-w-[320px] text-left text-sm">
<thead className="bg-zinc-50 text-zinc-600">
<tr><th className="p-3">Feature</th><th className="p-3">Growth</th><th className="p-3">Enterprise</th></tr>
</thead>
<tbody>
{rows.map(([f, a, b]) => (
<tr key={f} className="border-t border-zinc-100"><td className="p-3 font-medium">{f}</td><td className="p-3">{a}</td><td className="p-3">{b}</td></tr>
))}
</tbody>
</table>
</div>
);
}
Replace (Your Desired Section) and (YOUR HEX CODE COLOR) before pasting into Cursor, Copilot, or ChatGPT.