One scale wins
Finished pages do not use random spacing. They repeat a small set of gaps, padding, and text sizes so the page feels planned.
In Tailwind, utilities like p-4, gap-6, mt-8, text-sm, text-xl, and font-semibold come from design-token scales. In v4, spacing utilities are driven by theme variables like --spacing-*.
Why it matters
A hackathon app can work well but still look unfinished if every card has a different gap. Recruiters notice messy spacing before they read your code.
Your goal is not to decorate. Your goal is to make scanning easy on a phone, a laptop, and a projector during demos.
Pick a spacing rhythm
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
Set type levels
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
Before and after
This example turns a plain project card into something that feels consistent. Notice how spacing and type repeat instead of changing randomly.
export default function ProjectCard() {
return (
<section className="mx-auto max-w-3xl p-6">
<div className="rounded-2xl border border-slate-200 bg-white p-6 shadow-sm">
<p className="text-sm font-medium text-slate-500">HackIndia submission</p>
<h1 className="mt-2 text-3xl font-bold tracking-tight text-slate-950">
Campus Expense Splitter
</h1>
<p className="mt-4 text-base leading-7 text-slate-600">
Split mess bills, trip costs, and room expenses with UPI-ready summaries.
</p>
<div className="mt-6 flex gap-3">
<button className="rounded-xl bg-slate-950 px-4 py-2 text-sm font-semibold text-white">
View demo
</button>
<button className="rounded-xl border border-slate-300 px-4 py-2 text-sm font-semibold text-slate-900">
GitHub repo
</button>
</div>
</div>
</section>
);
}Use AI carefully
You can ask ChatGPT, Gemini, or Claude to clean up spacing and typography in a component. Paste the JSX and ask it to use a consistent Tailwind scale.
Check that it does not add custom CSS for simple spacing. Check that it keeps the page readable and does not return huge class strings with ten different text sizes.
Prompt:
Clean up the spacing and typography in this React component using Tailwind CSS utilities.
Use a small repeated scale for padding, margin, gap, and text sizes.
Do not change the component logic.
Explain the spacing choices after the code.Common mistake
Do not use margin to fix every small visual problem. If the whole section feels cramped, change the parent padding or gap first.
Also avoid arbitrary values too early, like mt-[17px]. They make the page harder to maintain unless you are matching a strict design.
Do this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done