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

new-component

创建符合 GPUI 设计规范的 UI 组件,基于现有模式实现无状态或有状态元素,确保样式与 API 一致性,并配套文档和交互示例,用于构建可复用的界面模块。

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

Skills.MD

## Instructions When creating new GPUI components: 1. **Follow existing patterns**: Base implementation on components in `crates/ui/src` (examples: `Button`, `Select`) 2. **Style consistency**: Follow existing component styles and Shadcn UI patterns 3. **Component type decision**: - Use stateless elements for simple components (like `Button`) - Use stateful elements for complex components with data (like `Select` and `SelectState`) 4. **API consistency**: Maintain the same API style as other elements 5. **Documentation**: Create component documentation 6. **Stories**: Write component stories in the story folder ## Component Types - **Stateless**: Pure presentation components without internal state - **Stateful**: Components that manage their own state and data

评论 0

还没有评论,来抢沙发。