smithery.ai

frontend-ui

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

First seen Mar 30, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 6,079 B
  • docs SUMMARY.md 106 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

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.

``html <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).

``html <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.