| name | frontend-ui-design |
| description | 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. |
| domain | content |
| author | oyi77 |
| license | Apache-2.0 |
| subdomain | content-creation |
| tags | ["design","frontend","ui","react","css","components","responsive"] |
| version | 1.0.0 |
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}`}
onClick={onClick}
disabled={disabled}
aria-disabled={disabled}
>
{children}
</button>
);
}
Code Example (CSS Responsive Grid)
.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
npm create vite@latest my-app -- --template react-ts
cd my-app
npm install tailwindcss @tailwindcss/vite
npx storybook@latest init
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 |