new-component
Installation
SKILL.md
Instructions
When creating new GPUI components:
- Follow existing patterns: Base implementation on components in
crates/ui/src(examples:Button,Select,Dialog) - Style consistency: Follow existing component styles and Shadcn UI patterns
- Component type decision:
- Use stateless elements for simple components (like
Button) - Use stateful elements for complex components with data (like
SelectandSelectState) - Use composition for components built on existing components (like
AlertDialogbased onDialog)
- Use stateless elements for simple components (like
- API consistency: Maintain the same API style as other elements
- Documentation: Create component documentation
- Stories: Write component stories in the story folder
- Registration: Add the component to
crates/story/src/main.rsstory list