In the Skill's Own Terms
Builds reusable UI components across React, Vue, and Svelte using modern composition patterns, CSS-in-JS solutions, and component API design principles. Covers compound components, render props, slots, and framework-specific patterns like React context, Vue composables, and Svelte runes. Applies to component libraries, design systems, and refactoring legacy components.
The guide recommends accessibility, semantic props, single responsibility and appropriate controlled or uncontrolled state. It includes a React button example, a compound accordion, Vue context and Svelte runes. Other snippets illustrate usage rather than supplying a complete, tested component library.
What it produces
- Component code and API decisions adapted to the chosen framework and task.
- Styling and composition patterns to review in the existing project, not a prebuilt cross-framework library.
How It Works
- 01Choose a Styling Approach
Choose from Tailwind CSS for rapid prototyping, CSS Modules for scoped styles, styled-components for dynamic React styling, Emotion for SSR-friendly flexibility, or Vanilla Extract for zero-runtime performance.
- 02Design the Component API
Use semantic prop names like isLoading instead of loading, provide sensible defaults, support composition via children, and allow style overrides through className or style props.
- 03Implement framework-specific Patterns
Use React context for compound components, Vue 3 composables with provide and inject, or Svelte 5 runes with $props and $derived for reactive state.