wshobson avatar

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-code

Installs 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
1resend avatarreact-emailresend/resend-skillsUse when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emai13.3Kskills.sh installs
2heroui-inc avatarheroui-reactheroui-inc/herouiHeroUI v3 React component library (Tailwind CSS v4 + React Aria). Use when building UIs with HeroUI — creating Buttons, Modals, Forms, Cards; installing @heroui12.6Kskills.sh installs
3msw-git avatarmsw-ui-systemmsw-git/msw-ai-coding-plugins-officialMSW `.ui` single entry point — design + component API + builder + runtime. Anchor/pivot/RectTransform, UIGroup/CanvasGroup hierarchy, layout recipes (HUD/popup/10.5Kskills.sh installs
4resend avatarreact-emailresend/react-emailUse when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emai10Kskills.sh installs
5onmax avatarvueonmax/nuxt-skillsUse when editing .vue files, creating Vue 3 components, writing composables, or testing Vue code - provides Composition API patterns, props/emits best practices8.1Kskills.sh installs
6onmax avatarnuxt-uionmax/nuxt-skillsUse when building styled UI with @nuxt/ui v4 components - create forms with validation, implement data tables with sorting, build modal dialogs and overlays, co7.2Kskills.sh installs