Skip to content
frontend-ui logo

Frontend UI Development Masterclass

frontend-ui

Build beautiful, responsive UIs with React, Tailwind CSS, and Framer Motion animations.

SKILL.md

Full skill instructions

Frontend UI Development Masterclass

Core Philosophy

This skill focuses on creating "premium" web experiences. We don't just build functionality; we build feeling. Every interaction should be smooth, every layout responsive, and every aesthetic choice intentional.

Technology Stack Deep Dive

1. React Architecture & Patterns

We use React not just for components, but for state-driven UI architecture.

Component Composition Patterns

Avoid prop-drilling by using composition (children prop) and slots.

// Bad: Prop drilling
<Layout userName={user.name} userAvatar={user.avatar} onLogout={handleLogout} />

// Good: Composition
<Layout
  header={<Header user={user} onLogout={handleLogout} />}
  sidebar={<Sidebar items={navItems} />}
>
  {children}
</​Layout>
Custom Hooks for Logic Separation

Never clutter UI components with complex logic. Extract it.

// hooks/​useAsync.js
export const useAsync = (asyncFunction, immediate = true) => {
  const [status, setStatus] = useState("idle");
  const [value, setValue] = useState(null);
  const [error, setError] = useState(null);

  const execute = useCallback(() => {
    setStatus("pending");
    setValue(null);
    setError(null);
    return asyncFunction()
      .then((response) => {
        setValue(response);
        setStatus("success");
      })
      .catch((error) => {
        setError(error);
        setStatus("error");
      });
  }, [asyncFunction]);

  useEffect(() => {
    if (immediate) execute();
  }, [execute, immediate]);

  return { execute, status, value, error };
};
Performance Optimization
  • useMemo: Cache expensive calculations.
  • useCallback: Stabilize function references (crucial for passing props to optimized child components).
  • React.memo: Prevent re-renders of pure components.

2. Tailwind CSS Mastery

Tailwind is more than utility classes; it's a design system engine.

Arbitrary Values & One-offs

Use [] syntax for precise control when design tokens don't fit, but overuse indicates a weak design system.

<div class="top-[17px] w-[calc(100%-20px)] bg-[#1a1a1a]"></​div>
Advanced Selectors
  • Group Hover: Style child based on parent state.
    <div class="group card">
      <p class="text-gray-500 group-hover:text-white transition">Content</​p>
    </​div>
    
  • Peer Modifiers: Style sibling based on previous sibling state (great for form validation).
    <input class="peer invalid:border-red-500" required />
    <p class="invisible peer-invalid:visible text-red-500">Error</​p>
    
  • Direct Children: *:p-4 (applies padding to all direct children).
Tailwind Variables (v4+)

Access CSS variables directly in classes if configured, or use arbitrary values to set them.

<div class="--bg-opacity:0.5 bg-black/[var(--bg-opacity)]"></​div>

3. Framer Motion Excellence

Animations should be physics-based, not linear.

The layout Prop

Magically animate layout changes (reordering lists, expanding cards).

<motion.div layout transition={{ type: "spring", stiffness: 300, damping: 30 }}>
  {/​* Content that changes size/​position */​}
</​motion.div>
Variants for Orchestration

Coordinate animations between parent and children.

const listVariants = {
  hidden: { opacity: 0 },
  show: {
    opacity: 1,
    transition: {
      staggerChildren: 0.1,
      delayChildren: 0.3,
    },
  },
};

const itemVariants = {
  hidden: { opacity: 0, y: 20 },
  show: { opacity: 1, y: 0 },
};

// Usage
<motion.ul variants={listVariants} initial="hidden" animate="show">
  <motion.li variants={itemVariants}>Item 1</​motion.li>
  <motion.li variants={itemVariants}>Item 2</​motion.li>
</​motion.ul>;
Gestures

Add tactile feedback easily.

<motion.button
  whileHover={{ scale: 1.05 }}
  whileTap={{ scale: 0.95 }}
  transition={{ type: "spring", stiffness: 400, damping: 17 }}
>
  Click Me
</​motion.button>

Professional Workflow

1. Component scaffolding

Always create components with a future-proof interface.

  • use ts or js with JSDoc
  • define className prop for overrides using clsx and tailwind-merge
import { cn } from "@/​lib/​utils"; // standard shadcn/​ui utility

export function Button({ className, variant, ...props }) {
  return (
    <button
      className={cn(
        "rounded px-4 py-2 font-medium transition active:scale-95",
        variant === "primary" && "bg-blue-600 text-white hover:bg-blue-700",
        variant === "ghost" && "bg-transparent hover:bg-slate-100",
        className,
      )}
      {...props}
    />
  );
}

2. Responsive Strategy

  • Mobile First: default classes are mobile. md: is "tablet and up".
  • Container Queries: Use @tailwindcss/​container-queries for component-level responsiveness.

3. Accessibility (A11y)

  • Radix UI / Headless UI: Use headless components for complex interactive elements (Dialogs, Dropdowns) to ensure full keyboard navigation and screen reader support.
  • Focus States: Never remove outline-none without adding a custom focus style (focus-visible:ring-2).

Troubleshooting Common Issues

"My animation jumps/​glitches"

  • Ensure layout animations have stable keys.
  • Check if you are animating height: auto without layout prop.

"Tailwind classes aren't applying"

  • Check tailwind.config.js content array covers the file path.
  • Are you dynamically constructing class names? bg-${color}-500 will NOT work. Full class names must exist in source code.

"Re-renders are killing performance"

  • Use React DevTools Profiler.
  • Check for objects/​arrays defined inside component body being passed as props (breaking strict equality checks). Wrap them in useMemo or move outside component.

More skills from diegosouzapw

accessibility logo
diegosouzapw/awesome-omni-skill

accessibility

Accessibility guidelines for VS Code features — covers accessibility help dialogs, accessible views, verbosity settings, accessibility signals, ARIA alerts/status announcements, keyboard navigation, and ARIA labels/roles. Applies to both new interactive UI surfaces and updates to existing feature...

62 1
View
mermaid-diagrams logo
diegosouzapw/awesome-omni-skill

mermaid-diagrams

Mermaid diagram creation for flowcharts, sequences, ERDs, and more. Generate diagrams from text in markdown files. Use for documentation, architecture diagrams, and visual representations. Triggers on mermaid, flowchart, sequence diagram, ERD, entity relationship, gantt chart, pie chart, class di...

62 1
View
tauri2-react-rust logo
diegosouzapw/awesome-omni-skill

tauri2-react-rust

Guides development of cross-platform desktop apps with Tauri 2, TypeScript, React, and Rust. Use when building Tauri apps, implementing IPC, designing Rust backend or TypeScript/React frontend, when researching or cloning a website (open site, snapshot elements), when verifying local dev or built...

62 1
View
fp-ts-errors logo
diegosouzapw/awesome-omni-skill

fp-ts-errors

Handle errors as values using fp-ts Either and TaskEither for cleaner, more predictable TypeScript code. Use when implementing error handling patterns with fp-ts.

62 0
View
ring:pre-dev-research logo
diegosouzapw/awesome-omni-skill

ring:pre-dev-research

Gate 0 research phase for pre-dev workflow. Dispatches 3 parallel research agents to gather codebase patterns, external best practices, and framework documentation BEFORE creating PRD/TRD. Outputs research.md with file:line references.

62 0
View
create-assistant logo
diegosouzapw/awesome-omni-skill

create-assistant

Create and configure Vapi voice AI assistants with models, voices, transcribers, tools, hooks, and advanced settings. Use when building voice agents, phone bots, customer support assistants, or any conversational AI that handles phone or web calls.

62 0
View
codex-headless logo
diegosouzapw/awesome-omni-skill

codex-headless

Delegiere Aufgaben an OpenAI Codex CLI im Headless-Mode. Nutzt ChatGPT Subscription (KEIN API Key). Nur Workspace-Zugriff, KEIN System-Zugriff. Auto-Accept mit --full-auto. Web-Recherche mit --search.

62 0
View
social-media-scheduler logo
diegosouzapw/awesome-omni-skill

social-media-scheduler

Generate a full week of social media content for any topic. Outputs platform-optimized posts for Twitter/X, LinkedIn, and Instagram with hashtags and posting times.

62 0
View
Data Privacy Compliance logo
diegosouzapw/awesome-omni-skill

Data Privacy Compliance

Data privacy and regulatory compliance specialist for GDPR, CCPA, HIPAA, and international data protection laws. Use when implementing privacy controls, conducting data protection impact assessments, ensuring regulatory compliance, or managing data subject rights. Expert in consent management, da...

62 0
View
triple-review logo
diegosouzapw/awesome-omni-skill

triple-review

Reviews a task using the TRIPLE protocol, as the review agent.

62 0
View
Tech Stack & Architecture Decision logo
diegosouzapw/awesome-omni-skill

Tech Stack & Architecture Decision

Define and document the technology stack and architecture decisions for a project. Use when the user needs to choose a tech stack, make architecture decisions, define infrastructure choices, or document technology selections. Triggers on requests like "define the tech stack", "choose technologies...

62 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View