skills sourced live from GitHub · all skills listed are free · each skill is provided under its author's license.
home / Design / Web Component Design Skill by @wshobson
The skill is the plugins/ui-design/skills/web-component-design folder inside that repository. Copy it into the folder your agent loads skills from; check your agent's documentation for where that is.
Patterns for reusable UI components in React, Vue and Svelte: composition, styling approaches and component API design.
Compares composition strategies and CSS-in-JS options, then shows framework-specific examples. Meant for people building a component library or design system who want consistent, accessible APIs.
The original SKILL.md is organised into these sections:
Written and maintained by @wshobson. It is published under the MIT license, which allows reuse with attribution. See the author profile. SkillDirectory does not claim authorship: this page adds our own review and links back to the original, and the skill's text belongs to its author.
# Web Component Design
Build reusable, maintainable UI components using modern frameworks with clean composition patterns and styling approaches.
## When to Use This Skill
- Designing reusable component libraries or design systems
- Implementing complex component composition patterns
- Choosing and applying CSS-in-JS solutions
- Building accessible, responsive UI components
- Creating consistent component APIs across a codebase
- Refactoring legacy components into modern patterns
- Implementing compound components or render props
## Core Concepts
### 1. Component Composition Patterns
**Compound Components**: Related components that work together
```tsx
// Usage
<Select value={value} onChange={setValue}>
<Select.Trigger>Choose option</Select.Trigger>
<Select.Options>
<Select.Option value="a">Option A</Select.Option>
<Select.Option value="b">Option B</Select.Option>
</Select.Options>
</Select>
```
**Render Props**: Delegate rendering to parent
```tsx
…
Excerpt only, quoted from the author's repository. Open the repository for the complete file.