
Web Component Design
Shows you how to build proper component APIs with composition patterns like compound components and render props across React, Vue, and Svelte. Covers CSS-in-JS approaches from Tailwind to styled-components, with code examples for accessible button variants, accordion components, and context patterns. Good for when you're setting up design systems or refactoring messy component hierarchies. The framework-specific patterns are solid, though the Vue 3 composables section could use more real-world error handling examples.
- skills.sh installs
- 13.6K
- GitHub stars
- 42.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wshobson/agents --skill web-component-design --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
// 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
<DataFetcher url="/api/users">
{({ data, loading, error }) =>
loading ? <Spinner /> : <UserList users={data} />
}
</DataFetcher>
Slots (Vue/Svelte): Named content injection points
Sponsors
Details
- Repository
- github.com/wshobson/agents
- Categories
- Frontend Development, Code Review & Quality, Design & UI/UX
More from wshobson/agents
All 174- Gitlab Ci Patterns13.6K
- Grafana Dashboards13.6K
- Langchain Architecture13.6K
- Protocol Reverse Engineering13.5K
- Python Packaging13.4K
- Llm Evaluation13.3K
- Python Type Safety13.2K
- Startup Financial Modeling13.1K
- React Modernization13.1K
- Wcag Audit Patterns13K
- Unity Ecs Patterns12.5K
- Workflow Orchestration Patterns12.5K
- Helm Chart Scaffolding12.4K
- Python Resilience12.2K
- Market Sizing Analysis12.2K
- Memory Safety Patterns12.2K
- Gitops Workflow12.1K
- Python Observability12K
- Shellcheck Configuration12K
- Python Configuration12K
- Cost Optimization11.9K
- Embedding Strategies11.8K
- Data Quality Frameworks11.7K
- Startup Metrics Framework11.7K