Two Plan Toggle
Two-plan Free vs Pro pricing comparison with light and dark card contrast. Indie tool and plugin pricing pattern with upgrade button on the Pro tier. Simple grid for solopreneur products.
Dependencies
react
npm install react react-domexport function TwoPlanPricing() {
return (
<section className="mx-auto grid max-w-3xl gap-6 px-6 py-16 md:grid-cols-2">
<div className="rounded-2xl border border-zinc-200 bg-white p-8">
<h3 className="text-lg font-semibold">Free</h3>
<p className="mt-2 text-4xl font-bold">$0</p>
<p className="mt-4 text-sm text-zinc-600">For personal projects and learning.</p>
</div>
<div className="rounded-2xl bg-zinc-900 p-8 text-white">
<h3 className="text-lg font-semibold">Pro</h3>
<p className="mt-2 text-4xl font-bold">$12</p>
<p className="mt-4 text-sm text-zinc-400">Commercial use and premium blocks.</p>
<button className="mt-6 rounded-xl bg-indigo-500 px-5 py-2.5 text-sm font-semibold">Upgrade</button>
</div>
</section>
);
}
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 TwoPlanPricing() {
return (
<section className="mx-auto grid max-w-3xl gap-6 px-6 py-16 md:grid-cols-2">
<div className="rounded-2xl border border-zinc-200 bg-white p-8">
<h3 className="text-lg font-semibold">Free</h3>
<p className="mt-2 text-4xl font-bold">$0</p>
<p className="mt-4 text-sm text-zinc-600">For personal projects and learning.</p>
</div>
<div className="rounded-2xl bg-zinc-900 p-8 text-white">
<h3 className="text-lg font-semibold">Pro</h3>
<p className="mt-2 text-4xl font-bold">$12</p>
<p className="mt-4 text-sm text-zinc-400">Commercial use and premium blocks.</p>
<button className="mt-6 rounded-xl bg-indigo-500 px-5 py-2.5 text-sm font-semibold">Upgrade</button>
</div>
</section>
);
}
Replace (Your Desired Section) and (YOUR HEX CODE COLOR) before pasting into Cursor, Copilot, or ChatGPT.