Alex's Profile
React beginner
I am learning how small Tailwind utilities combine into a complete design.
Foundations & build/Tailwind CSS Styling
Your takeaway: Read Tailwind utilities inside className, change them, and predict how the card will look.
Making it look less ugly
Old way — flip between HTML and CSS files
1/* styles.css */2.card {3 background: white;4 padding: 16px;5 border-radius: 12px;6}7 8// JSX9<div className="card">...</div>Tailwind — utility-first, right in the class name
1<div className="bg-white p-4 rounded-xl shadow-lg">2 ...3</div>4 5// Read the class names.6// They say exactly what they do.1<div className="bg-white p-4 rounded-xl shadow-lg">2 ...3</div>bg-white→ background whitep-4→ padding of 4 unitsrounded-xl→ very rounded cornersshadow-lg→ large drop shadowHandy: Tailwind CSS CheatSheet
"Never memorize something that you can look up." Scan spacing, typography, flex, borders — copy the class you need.
Open the CheatSheetTailwind is written in className
The utilities sit directly on the JSX element, so they can feel like “inline styling”. Technically, React's inline-style API is the style={{ ... }} prop; today we use Tailwind utilities inside className instead.
Change the background, rounding, padding, and shadow. Watch both the card and its generated className update immediately.
Tailwind playground
Mix one background, corner, padding, and shadow utility. Each class changes one visual job, so you can experiment without writing a separate CSS rule.
Tailwind goes in className
In React, write className="rounded-2xl bg-white p-5". The style={{ ... }}prop is React's inline CSS—it is not where Tailwind utility names go.
Live profile-card preview
React beginner
I am learning how small Tailwind utilities combine into a complete design.
<article className="mx-auto w-full max-w-sm border border-zinc-200 text-zinc-900 transition-all duration-200 motion-reduce:transition-none bg-white rounded-2xl p-5 shadow-lg" />Choose a utility. The className and card preview update together.
Styles not showing up later?
Starter classes
text-xl, font-bold, bg-blue-500, rounded-lg, p-4, mt-2. Mix and match — that is the whole game.Theory done — time to build
Next: Hands-on #00 → #04. Follow each step and use the Copy button on every code block.