Back to skills
extension
Category: Development & EngineeringNo API key required

Next.js Styling & UI Performance

Zero-runtime CSS strategies (Tailwind) and RSC compatibility.

personAuthor: jakexiaohubgithub

Styling & UI Performance

Priority: P1 (HIGH)

Prioritize Zero-Runtime CSS for Server Components.

Library Selection

| Library | Verdict | Reason | | :------------------------- | :----------------- | :------------------------------------------------- | | Tailwind / shadcn | Preferred (P1) | Zero-runtime, RSC compatible. Best for App Router. | | CSS Modules | Recommended | Scoped, zero-runtime. | | MUI / Chakra (Runtime) | Avoid | Forces use client widely. Degrades performance. |

Patterns

  1. Dynamic Classes: Use clsx + tailwind-merge (cn utility).
  2. Font Optimization: Use next/font to prevent Cumulative Layout Shift (CLS).
  3. CLS Prevention: Always specify width/height on images.