This repository is for practicing Tailwind CSS v4 by cloning a provided UI design.
Your task is to recreate the sample UI as close as possible using Node.js and Tailwind CSS v4 CLI.
Below is the UI that you need to clone using Tailwind CSS.
⚠️ The goal is visual accuracy — layout, spacing, typography, colors, and responsiveness.
tailwindcss-practice/
│
├── img/
│ └── (7 iPhone images – use these assets in the UI)
│
├── src/
│ ├── index.html
│ ├── input.css
│ └── output.css
│
├── task-tailwind.png
│ └── (sample UI reference)
│
└── README.md
- Clone the UI shown in
task-tailwind.png - Use Tailwind CSS v4 (CLI) only
- Do NOT use other UI frameworks (Bootstrap, Material UI, etc.)
- Apply responsive design principles
- Use semantic HTML
Make sure you have the following installed:
- Node.js (v18 or later recommended)
- npm
git clone https://github.com/enehry/tailwindcss-practice.git
cd tailwindcss-practicenpm init -ynpm install -D tailwindcss @tailwindcss/cliCreate src/input.css:
@import "tailwindcss";Tailwind CSS v4 uses a single import instead of
@tailwind base/components/utilities.
Create src/index.html and link the output CSS:
<link href="./output.css" rel="stylesheet">Run the Tailwind CLI:
npx tailwindcss -i ./src/input.css -o ./src/output.css --watchThis command will:
- Generate
output.css - Watch for changes automatically
- All HTML files must be inside the
src/folder - Use images from the
img/directory - Match the sample UI in terms of:
- Layout
- Spacing
- Colors
- Typography
- Responsive behavior
img/→ Contains 7 iPhone imagestask-tailwind.png→ UI reference to clone
- ✅ Tailwind utility classes only
- ❌ No custom CSS unless absolutely necessary
- ❌ No external CSS frameworks
- ✅ Semantic HTML required
Add this to your package.json:
"scripts": {
"dev": "tailwindcss -i ./src/input.css -o ./src/output.css --watch"
}Then run:
npm run devBy completing this exercise, you should be comfortable with:
- Tailwind CSS v4 workflow
- Utility-first styling
- Responsive layouts
- Translating UI designs into code
Happy coding 🚀
Practice. Observe. Improve.
