UI UX For Frontend Engineers
Why having good understanding of UI/UX helps you level up as a Frontend Eng.
Why Does UI/UX Matter (asking you as a dev)?
Frontend engineers need to stop treating UI/UX as some optional design layer that’s separate from dev work. You’re not just building some dashboard with buttons and inputs—you’re building a product that actual humans will use. Every single decision you make in your frontend code has a UX impact. If you don’t get that, you’re just a glorified API consumer with divs.
Instead of arguing with UX designers, understand their mindset. Why does this flow work? Why does this one feel frustrating? Why does clicking this button 5 times feel like shit? Why does this form feel confusing? Ask these questions before you start coding.
The Core Principles
1. Universal Margin & Padding Rules
Spacing isn’t just about making things look nice—it directly affects readability, usability, and clickability. Follow universal whitespace rules:
- Text needs room to breathe → No cramming paragraphs together like a bad PowerPoint slide.
- Padding ≠ Margin → Don’t just throw
px-5
everywhere and call it a day. - Hierarchy matters → Whitespace defines structure, so make it consistent.
2. Font Size Principles
Don’t just set everything to text-sm
or text-lg
because it “looks good.”
- Body text: 14px–16px (for readability, anything smaller is a crime).
- Headings: Scale properly (H1 > H2 > H3 should be visually distinct, not random sizes).
- Contrast & readability → Low contrast text looks modern but is unreadable to half your users.
3. Stop Overdoing Animations
Animations should help the user, not flex your Tailwind skillset. If an animation adds unnecessary friction, kill it.
- Good: Subtle hover effects, smooth page transitions.
- Bad: Loading spinners on fast actions, excessive motion for no reason.
- Rule of thumb: If it slows down the user, it’s bad UX.
4. Why Rounded Borders?
Ever wonder why almost everything has rounded borders nowadays? It’s not just a trend—it’s because sharp edges feel rigid, while rounded corners feel softer and more human-friendly. There’s a reason why buttons, input fields, and even modals have rounded corners.
- Use soft borders on interactive elements → Buttons, cards, modals.
- Don’t go full pill-shaped on everything unless it serves a purpose.
- Not every UI element needs a border → Use spacing and shadows instead.
5. Build for Users, Not Yourself
You’re not just “building software.” You’re building software for humans. If your audience is a 50-year-old businessman who just needs a simple dashboard, why are you adding neon gradients and dark mode with glassmorphism? Think before you ship.
- Stop and ask: Checkbox or radio button?
- Stop and ask: Do I need this extra step in the flow?
- Stop and ask: Does this make the user’s life easier or just look cool?
Ship fast, but THINK before you ship. Iterate based on real user feedback, not just what looks good in your Figma file.
6. Universal White Space Rules
Every well-designed product follows whitespace rules. Bad spacing = chaotic UI. Good spacing = intuitive UX.
- Whitespace guides attention → More space around elements = more focus.
- Consistency is key → Don’t mix 8px gaps with 32px for no reason.
- Balance negative space → Cramming elements together is as bad as leaving too much empty space.
Stop Building for the Sake of Building
UI/UX is not a checklist—it’s the core of good frontend engineering. Next time you build something, stop and think before you code:
- Why am I designing it this way?
- Does this make the experience better for my users?
- Would I enjoy using this myself?
Frontend engineers who understand UI/UX don’t just write better code—they build better products. That’s the real goal. and maybe go from being a frontend eng to a design eng