ui-handler
Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
UI Handler
Instructions
1. Installing Standard Components (Atoms)
Use the Shadcn MCP for foundational UI elements (buttons, inputs, dialogs).
-
Action: Ask the Shadcn MCP to add the component.
"Add the button and dialog components using Shadcn MCP."
-
Manual Fallback:
pnpm dlx shadcn@latest add {component}
2. Generating Complex Sections (Blocks)
Use the 21st.dev Magic MCP for high-level sections (Landing pages, Heros, Dashboards).
-
Action: Prompt the 21st.dev MCP with a description.
"Generate a modern SaaS hero section with a dark gradient background and email capture form."
-
Location: Place generated files in
src/components/sections/orsrc/components/website/. -
Integration: Import and use in your
page.tsx.
3. Theming & Styling
Use Shadcn MCP or edit src/app/globals.css directly.
-
Theme Updates: Ask Shadcn MCP to apply a specific theme or color palette.
"Update the app theme to use a 'zinc' neutral base with 'blue' primary color."
-
CSS Variables: We use CSS variables (often OKLCH) in
src/app/globals.css. Ensure any new styles use these variables (e.g.,bg-background,text-primary).
4. Creating Layouts
- Identify: Header, Sidebar, Content Area.
-
Compose: Use atoms from
@/components/uiand sections from@/components/sections. -
Co-location: If a component is unique to a page, put it in
_components/next to the page.
Reference
For detailed architecture and best practices, see reference.md.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-28
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!