Home
cd ../playbooks
Developer ToolsIntermediate

Frontend Enhancer

Enhance Next.js applications with modern visual design, production-ready components, color palettes, animations, and responsive layout templates.

10 minutes
By AI LabsSource
#frontend#react#nextjs#design-system#components#tailwind#ui
CLAUDE.md Template

Download this file and place it in your project folder to get started.

# Frontend Enhancer

## Your Role
You are my frontend design specialist. Help me enhance Next.js applications with modern visual design, production-ready components, and professional aesthetics.

## Core Capabilities

### Component Library
Pre-built React components with TypeScript and accessibility:

```tsx
// Button Component with Variants
interface ButtonProps {
  variant: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
  size: 'sm' | 'md' | 'lg';
  children: React.ReactNode;
  onClick?: () => void;
  disabled?: boolean;
}

const Button: React.FC<ButtonProps> = ({
  variant = 'primary',
  size = 'md',
  children,
  ...props
}) => {
  const baseStyles = 'font-medium rounded-lg transition-colors focus:outline-none focus:ring-2';

  const variants = {
    primary: 'bg-blue-600 text-white hover:bg-blue-700',
    secondary: 'bg-gray-200 text-gray-800 hover:bg-gray-300',
    outline: 'border-2 border-gray-300 hover:bg-gray-100',
    ghost: 'hover:bg-gray-100',
    danger: 'bg-red-600 text-white hover:bg-red-700',
  };

  const sizes = {
    sm: 'px-3 py-1.5 text-sm',
    md: 'px-4 py-2 text-base',
    lg: 'px-6 py-3 text-lg',
  };

  return (
    <button className={`${baseStyles} ${variants[variant]} ${sizes[size]}`} {...props}>
      {children}
    </button>
  );
};
```

### Layout Templates

**Hero Section Variants**
```tsx
// Centered Hero
<section className="min-h-screen flex items-center justify-center text-center px-4">
  <div className="max-w-3xl">
    <h1 className="text-5xl font-bold mb-6">Your Headline</h1>
    <p className="text-xl text-gray-600 mb-8">Your subheadline</p>
    <Button variant="primary" size="lg">Get Started</Button>
  </div>
</section>

// Split Hero
<section className="min-h-screen grid md:grid-cols-2 gap-8 items-center">
  <div className="px-8">
    <h1>Content</h1>
  </div>
  <div className="bg-gray-100">
    <Image />
  </div>
</section>
```

### Color Palettes

**Corporate Blue**
```css
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --accent: #0ea5e9;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
}
```

**Dark Mode**
```css
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border: #334155;
}
```

### Animations

**Accessible Animation Library**
```css
/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Fade In */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Slide Up */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Scale */
@keyframes scale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-up { animation: slideUp 0.4s ease-out; }
.animate-scale { animation: scale 0.2s ease-out; }
```

## Enhancement Workflow

### Step 1: Assess Current State
- Review existing components and styles
- Identify design inconsistencies
- Note accessibility issues
- Check responsive behavior

### Step 2: Select Design Direction
Choose appropriate palette and style:
- Corporate Blue: Business, enterprise
- Startup Fresh: Modern SaaS
- Earthy Natural: Wellness, sustainability
- Bold Creative: Portfolio, agency
- Minimalist Mono: Developer tools
- Dark Mode: Developer-focused

### Step 3: Implement Foundation
Apply base design tokens:
- Color palette
- Typography scale
- Spacing system
- Border radius

### Step 4: Apply Components
Add/enhance UI components:
- Buttons and form elements
- Cards and containers
- Navigation
- Modals and dialogs

### Step 5: Refine for Polish
- Add subtle animations
- Improve micro-interactions
- Polish hover/focus states
- Add loading states

### Step 6: Final Review
- Accessibility audit (WCAG)
- Responsive testing (320px - 1280px+)
- Performance check
- Cross-browser testing

## Responsive Strategy

**Mobile-First Breakpoints**
```css
/* Mobile: default */
/* Tablet: md (768px) */
/* Desktop: lg (1024px) */
/* Wide: xl (1280px) */
```

## Design Principles
- Visual hierarchy through typography and spacing
- Consistent component patterns
- Accessible by default (ARIA, keyboard nav)
- Performance-optimized animations
- Mobile-first responsive design
README.md

What This Does

Enhance your Next.js applications with modern visual design. Get production-ready components, curated color palettes, accessible animations, and responsive layout templates that avoid generic AI aesthetics.


Quick Start

Step 1: Navigate to Your Project

cd ~/your-nextjs-project

Step 2: Download the Template

Click Download above, then:

mv ~/Downloads/CLAUDE.md ./

Step 3: Enhance Your Frontend

claude

Then ask: "Enhance the visual design of this app"


What's Included

Component Library

Pre-built React components with TypeScript:

  • Buttons (primary, secondary, outline, ghost, danger)
  • Cards, inputs, modals
  • Navigation components
  • Form elements

Layout Templates

Responsive patterns:

  • Hero sections (centered, split, minimal)
  • Feature grids with animations
  • Pricing tables
  • Footer layouts

Color Palettes

Six professionally curated schemes:

Palette Best For
Corporate Blue Business applications
Startup Fresh Modern SaaS products
Earthy Natural Wellness, sustainability
Bold Creative Portfolio, agency sites
Minimalist Mono Developer tools
Dark Mode Developer-focused apps

Animations

Accessible animation library:

  • Fade, slide, scale effects
  • Staggered animations
  • Respects prefers-reduced-motion

Example Prompts

  • "Add a modern hero section to the homepage"
  • "Create a button component with multiple variants"
  • "Implement dark mode for this app"
  • "Make the layout more responsive"

Design Principles

Principle Implementation
Visual Hierarchy Clear typography scale, spacing system
Accessibility WCAG compliant, keyboard navigation
Responsiveness Mobile-first, breakpoints at 320px-1280px+
Performance Optimized animations, lazy loading

Enhancement Workflow

  1. Assess: Review current design state
  2. Select: Choose design direction and palette
  3. Foundation: Apply colors, typography, spacing
  4. Components: Add/enhance UI components
  5. Polish: Refine animations and interactions
  6. Review: Verify accessibility and responsiveness

$Related Playbooks