首页/ AI 技能 / @skilllib/skill-2014279419932651521
Skill站外收录 @skilllib/skill-2014279419932651521

styling

提供基于零运行时 CSS 的 Next.js 样式方案,优先采用 Tailwind 与 shadcn 实现服务端组件兼容的高效 UI 开发,支持动态类名组合、字体优化及图像布局稳定性控制,兼顾性能与可维护性。

0.0 (0) 571 次安装 原作者 编程导航
收录于 2026-01-22
软件开发 AI 技能

Skills.MD

# 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). - _Reference_: [Dynamic Classes & Button Example](references/implementation.md) 2. **Font Optimization**: Use `next/font` to prevent Cumulative Layout Shift (CLS). - _Reference_: [Font Setup](references/implementation.md) 3. **CLS Prevention**: Always specify `width`/`height` on images.

评论 0

还没有评论,来抢沙发。