Frontend Ui Design
When to Use
Trigger phrases:
"frontend ui design"
"Design and build production-grade UI components using React, Vue, or vanilla HTM"
When building UI components or pages from scratch
When creating a design system or component library
When implementing responsive layouts
When improving accessibility of existing UI
When NOT to Use
- For backend logic (use backend skills)
- For database design (use data skills)
- For mobile-native apps (use mobile development skills)
Overview
Production-grade frontend UI design bridges visual design and engineering, transforming wireframes into accessible, responsive, and performant interfaces. This skill covers the full lifecycle — from component architecture and design tokens through CSS implementation, accessibility auditing, and design system distribution.
Modern frontend development spans two dominant ecosystems: React (with its component composition model and hook-based state management) and Vue (with its progressive framework and reactive system), alongside vanilla HTML/CSS for lightweight projects. Each requires mastery of component hierarchy, state management patterns, responsive layout strategies, and cross-browser compatibility testing.
Key capabilities include implementing design tokens via CSS custom properties or Tailwind configuration, building accessible components that meet WCAG 2.1 AA standards, creating responsive layouts using CSS Grid and Flexbox, and packaging reusable component libraries for multi-project reuse. CSS architecture choices — Tailwind utility classes, CSS Modules for scoped styles, or CSS-in-JS libraries — each trade locality against bundle size and runtime overhead.
The goal is consistent, keyboard-navigable, performant UIs that work reliably across devices from 320px mobile screens to 4K desktop displays, while remaining maintainable as the codebase grows.
Workflow
- Define requirements — Collect user stories, wireframes, brand guidelines, and target breakpoints. Document component hierarchy with a tree diagram before writing code.
- Select architecture — Choose atomic design for component decomposition, state management approach (React Context, Zustand, Pinia for Vue), and CSS strategy (Tailwind, CSS Modules, styled-components).
- Build design tokens — Define color palette, typography scale, spacing units, and shadows as CSS custom properties or Tailwind config. Verify contrast ratios meet WCAG AA.
- Implement component hierarchy — Build atoms (Button, Input) then molecules (FormField, Card) then organisms (DataTable, Navigation). Prefer composition over inheritance.
- Apply responsive styling — Use CSS Grid for page-level layouts and Flexbox for component-level alignment. Implement mobile-first breakpoints with consistent naming (sm, md, lg, xl).
- Integrate accessibility — Add semantic HTML, ARIA attributes, keyboard event handlers, and focus management. Test with screen readers and colour contrast analysers.
- Test and iterate — Run visual regression tests (Storybook, Chromatic), cross-browser checks, and performance audits (Lighthouse). Collect feedback and refine.
Anti-Rationalization Table
| Rationalization |
Reality |
| "Just use a UI library like MUI or Chakra" |
Libraries need deep customization for brand identity; CSS architecture and component composition skills remain essential |
| "Mobile-first is optional for our audience" |
60%+ of global traffic is mobile — responsive design is table stakes, not optional |
| "Accessibility is a nice-to-have add-on" |
WCAG compliance is legally required in many jurisdictions and directly affects SEO rankings |
| "CSS is easy, I will just write what works" |
Poor CSS architecture leads to specificity wars, !important overrides, and unmaintainable stylesheets |
| "We don't need a design system for a small project" |
Even small projects benefit from consistent spacing, typography, and color tokens — prevents tech debt from day one |
| "State management libraries solve everything" |
Poor component architecture causes prop-drilling and re-render issues that no state library can fix |
Code Example (React)
interface ButtonProps {
variant: 'primary' | 'secondary' | 'danger';
size: 'sm' | 'md' | 'lg';
children: React.ReactNode;
onClick?: () => void;
disabled?: boolean;
}
export function Button({ variant, size, children, onClick, disabled }: ButtonProps) {
return (
<button
className={`btn btn-${variant} btn-${size}`}
disabled={disabled}
aria-disabled={disabled}
>
{children}
</button>
);
}
Code Example (CSS Responsive Grid)
/* Responsive card grid with auto-fit columns */
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: clamp(1rem, 2vw, 2rem);
padding: var(--spacing-lg);
}
.card {
border-radius: 0.5rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
transition: box-shadow 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
.card {
transition: none;
}
}
Setup & Configuration
# Create React + TypeScript project with Vite
npm create vite@latest my-app -- --template react-ts
cd my-app
# Install Tailwind CSS v4 with Vite plugin
npm install tailwindcss @tailwindcss/vite
# Install Storybook for component workbench
npx storybook@latest init
# Chromatic for visual regression in CI
npm install -D chromatic
For Vue projects:
npm create vue@latest my-vue-app
cd my-vue-app
npm install unocss
Process
- Prepare — Gather brand assets, wireframes, and content strategy. Set up toolchain (Vite, Tailwind, Storybook).
- Design tokens — Establish color palette, typography scale, spacing units, and shadows as CSS custom properties or Tailwind config.
- Component build — Layer components via atomic design (atoms -> molecules -> organisms). Implement responsive variants and dark mode.
- Quality check — Run Lighthouse, AXE DevTools, keyboard navigation audit, and cross-browser visual diff.
- Deliver and document — Export component library with usage documentation, Storybook preview, and live demo URL.
Verification
Common Issues & Troubleshooting
| Problem |
Root Cause |
Solution |
| CSS specificity conflicts |
Nested selectors and !important overrides |
Use BEM naming, CSS Modules, or Tailwind utility classes |
| Layout breaks on mobile |
Fixed px widths or missing viewport meta |
Use relative units (rem, %, vw) and mobile-first media queries |
| Components re-render unexpectedly |
Missing React keys or unstable callback references |
Add stable keys to lists, memoize callbacks with useCallback |
| Color contrast fails WCAG AA |
Insufficient luminance difference against background |
Use WCAG contrast calculators; maintain minimum 4.5:1 ratio for normal text |
| Screen reader skips interactive element |
Missing or incorrect ARIA role or attribute |
Use semantic HTML where possible; add aria-label for visual-only labels |
| Hover styles don't work on touch devices |
:hover-dependent interactions without touch fallback |
Use @media (hover: hover) to separate pointer and touch interactions |
Monetization
| Approach |
Timeframe |
Description |
| Freelance component library |
2-4 weeks |
Build and sell a reusable component pack on Gumroad or GitHub Marketplace |
| UI audit consulting |
1-2 days per audit |
Offer accessibility, responsive, and design system audits for SaaS companies |
| Frontend mentorship course |
3-6 months |
Create a structured course on modern CSS architecture and component design |
| Design system retainer |
Ongoing |
Build and maintain a custom design system for a mid-size product company |
| Open-source plus consulting |
6-12 months |
Grow a popular open-source component library, monetize through sponsorships and training |
1---2name: frontend-ui-design3description: Use when design and build production-grade UI components using React, Vue, or vanilla HTML/CSS. Create responsive layouts, design systems, and accessible interfaces. Use when designing and build production-grade ui components using react, vue, or.4license: Apache-2.05---678# Frontend Ui Design910## When to Use11**Trigger phrases:**12- "frontend ui design"13- "Design and build production-grade UI components using React, Vue, or vanilla HTM"141516- When building UI components or pages from scratch17- When creating a design system or component library18- When implementing responsive layouts19- When improving accessibility of existing UI2021## When NOT to Use2223- For backend logic (use backend skills)24- For database design (use data skills)25- For mobile-native apps (use mobile development skills)2627## Overview2829Production-grade frontend UI design bridges visual design and engineering, transforming wireframes into accessible, responsive, and performant interfaces. This skill covers the full lifecycle — from component architecture and design tokens through CSS implementation, accessibility auditing, and design system distribution.3031Modern frontend development spans two dominant ecosystems: React (with its component composition model and hook-based state management) and Vue (with its progressive framework and reactive system), alongside vanilla HTML/CSS for lightweight projects. Each requires mastery of component hierarchy, state management patterns, responsive layout strategies, and cross-browser compatibility testing.3233Key capabilities include implementing design tokens via CSS custom properties or Tailwind configuration, building accessible components that meet WCAG 2.1 AA standards, creating responsive layouts using CSS Grid and Flexbox, and packaging reusable component libraries for multi-project reuse. CSS architecture choices — Tailwind utility classes, CSS Modules for scoped styles, or CSS-in-JS libraries — each trade locality against bundle size and runtime overhead.3435The goal is consistent, keyboard-navigable, performant UIs that work reliably across devices from 320px mobile screens to 4K desktop displays, while remaining maintainable as the codebase grows.3637## Workflow38391. **Define requirements** — Collect user stories, wireframes, brand guidelines, and target breakpoints. Document component hierarchy with a tree diagram before writing code.402. **Select architecture** — Choose atomic design for component decomposition, state management approach (React Context, Zustand, Pinia for Vue), and CSS strategy (Tailwind, CSS Modules, styled-components).413. **Build design tokens** — Define color palette, typography scale, spacing units, and shadows as CSS custom properties or Tailwind config. Verify contrast ratios meet WCAG AA.424. **Implement component hierarchy** — Build atoms (Button, Input) then molecules (FormField, Card) then organisms (DataTable, Navigation). Prefer composition over inheritance.435. **Apply responsive styling** — Use CSS Grid for page-level layouts and Flexbox for component-level alignment. Implement mobile-first breakpoints with consistent naming (sm, md, lg, xl).446. **Integrate accessibility** — Add semantic HTML, ARIA attributes, keyboard event handlers, and focus management. Test with screen readers and colour contrast analysers.457. **Test and iterate** — Run visual regression tests (Storybook, Chromatic), cross-browser checks, and performance audits (Lighthouse). Collect feedback and refine.4647## Anti-Rationalization Table4849| Rationalization | Reality |50|---|---|51| "Just use a UI library like MUI or Chakra" | Libraries need deep customization for brand identity; CSS architecture and component composition skills remain essential |52| "Mobile-first is optional for our audience" | 60%+ of global traffic is mobile — responsive design is table stakes, not optional |53| "Accessibility is a nice-to-have add-on" | WCAG compliance is legally required in many jurisdictions and directly affects SEO rankings |54| "CSS is easy, I will just write what works" | Poor CSS architecture leads to specificity wars, !important overrides, and unmaintainable stylesheets |55| "We don't need a design system for a small project" | Even small projects benefit from consistent spacing, typography, and color tokens — prevents tech debt from day one |56| "State management libraries solve everything" | Poor component architecture causes prop-drilling and re-render issues that no state library can fix |5758## Code Example (React)5960```tsx61interface ButtonProps {62 variant: 'primary' | 'secondary' | 'danger';63 size: 'sm' | 'md' | 'lg';64 children: React.ReactNode;65 onClick?: () => void;66 disabled?: boolean;67}6869export function Button({ variant, size, children, onClick, disabled }: ButtonProps) {70 return (71 <button72 className={`btn btn-${variant} btn-${size}`}73 onClick={onClick}74 disabled={disabled}75 aria-disabled={disabled}76 >77 {children}78 </button>79 );80}81```8283## Code Example (CSS Responsive Grid)8485```css86/* Responsive card grid with auto-fit columns */87.card-grid {88 display: grid;89 grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));90 gap: clamp(1rem, 2vw, 2rem);91 padding: var(--spacing-lg);92}9394.card {95 border-radius: 0.5rem;96 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);97 transition: box-shadow 0.2s ease;98}99100@media (prefers-reduced-motion: reduce) {101 .card {102 transition: none;103 }104}105```106107## Setup & Configuration108109```bash110# Create React + TypeScript project with Vite111npm create vite@latest my-app -- --template react-ts112cd my-app113114# Install Tailwind CSS v4 with Vite plugin115npm install tailwindcss @tailwindcss/vite116117# Install Storybook for component workbench118npx storybook@latest init119120# Chromatic for visual regression in CI121npm install -D chromatic122```123124For Vue projects:125```bash126npm create vue@latest my-vue-app127cd my-vue-app128npm install unocss129```130131132## Process1331341. **Prepare** — Gather brand assets, wireframes, and content strategy. Set up toolchain (Vite, Tailwind, Storybook).1352. **Design tokens** — Establish color palette, typography scale, spacing units, and shadows as CSS custom properties or Tailwind config.1363. **Component build** — Layer components via atomic design (atoms -> molecules -> organisms). Implement responsive variants and dark mode.1374. **Quality check** — Run Lighthouse, AXE DevTools, keyboard navigation audit, and cross-browser visual diff.1385. **Deliver and document** — Export component library with usage documentation, Storybook preview, and live demo URL.139140## Verification141142- [ ] All components render correctly at breakpoints: 320px, 768px, 1024px, 1440px143- [ ] Color contrast passes WCAG 2.1 AA minimum (4.5:1 for normal text, 3:1 for large)144- [ ] Keyboard navigation covers Tab order, visible focus indicators, Enter/Space activation, Escape close145- [ ] Screen reader announces dynamic content changes via ARIA live regions146- [ ] CSS architecture has no !important overrides or specificity battles147- [ ] Design tokens defined in a single source of truth (CSS custom properties or Tailwind config)148- [ ] Components maintain consistent spacing using the established scale (4px/8px base)149- [ ] Lighthouse performance score >= 90 for the rendered page150151## Common Issues & Troubleshooting152153| Problem | Root Cause | Solution |154|---|---|---|155| CSS specificity conflicts | Nested selectors and !important overrides | Use BEM naming, CSS Modules, or Tailwind utility classes |156| Layout breaks on mobile | Fixed px widths or missing viewport meta | Use relative units (rem, %, vw) and mobile-first media queries |157| Components re-render unexpectedly | Missing React keys or unstable callback references | Add stable keys to lists, memoize callbacks with useCallback |158| Color contrast fails WCAG AA | Insufficient luminance difference against background | Use WCAG contrast calculators; maintain minimum 4.5:1 ratio for normal text |159| Screen reader skips interactive element | Missing or incorrect ARIA role or attribute | Use semantic HTML where possible; add aria-label for visual-only labels |160| Hover styles don't work on touch devices | :hover-dependent interactions without touch fallback | Use @media (hover: hover) to separate pointer and touch interactions |161162## Monetization163164| Approach | Timeframe | Description |165|---|---|---|166| Freelance component library | 2-4 weeks | Build and sell a reusable component pack on Gumroad or GitHub Marketplace |167| UI audit consulting | 1-2 days per audit | Offer accessibility, responsive, and design system audits for SaaS companies |168| Frontend mentorship course | 3-6 months | Create a structured course on modern CSS architecture and component design |169| Design system retainer | Ongoing | Build and maintain a custom design system for a mid-size product company |170| Open-source plus consulting | 6-12 months | Grow a popular open-source component library, monetize through sponsorships and training |