Agent skill

Web Component Design Skill: React, Vue and Svelte

The web-component-design skill covers composition patterns, five styling approaches and component API rules for React, Vue and Svelte, with a class-variance-authority button as its quick start.

Install
gh skill install wshobson/agents web-component-design
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the web-component-design skill?

The web-component-design skill is a SKILL.md in the ui-design plugin of the wshobson/agents repository. It teaches an AI coding agent compound components, render props, slots, CSS-in-JS options and component API design for reusable React, Vue and Svelte component libraries.

A Select with Trigger, Options and Option children is the first code sample in this skill. It comes from the ui-design plugin of wshobson/agents and targets reusable, maintainable components in React, Vue and Svelte.

Despite the name, it is about framework components, not the browser's custom elements standard. The SKILL.md talks only about React, Vue and Svelte patterns and styling choices.

Composition and styling

  • Compound components: related parts that work together under one parent.
  • Render props: delegate rendering to the parent, as in a data fetcher.
  • Slots: named injection points in Vue and Svelte.
  • Styling table: Tailwind CSS, CSS Modules, styled-components, Emotion and Vanilla Extract, each with a best-fit use.

Component API rules

The skill models a button with variant, size, loading, disabled and icon props. Its principles are semantic prop names such as isLoading, sensible defaults, composition through children and style overrides with className or style.

Who the web-component-design skill is for

Best for

  • Building or refactoring a component library with one consistent API style.
  • Choosing between styling approaches with a clear table. Related: ui-styling.
  • Projects that are React heavy. Related: shadcn and frontend-ui-engineering.

Not for

  • Native custom elements and shadow DOM, which this skill does not discuss.
  • Token and theme architecture, which design-system-patterns handles in the same plugin.
  • Pixel level visual design. It shapes code structure and does not choose looks.

Use it with UiChemy

Component logic belongs in your app code, while WordPress pages come from design files. UiChemy Figma to WordPress converts a Figma design into Elementor or Gutenberg, and Composer adjusts it visually. Click Get Started on uichemy.com.