Frontend Components

Design reusable UI components with explicit props and documented APIs.

Updated Oct 26, 2025
One-click install
npx skills add https://github.com/Hieubkav/wincellarCloneBackend --skill frontend-components-hieubkav
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Frontend Components
Source: https://github.com/Hieubkav/wincellarCloneBackend/tree/main/.claude/skills/frontend/frontend-components
Command: npx skills add https://github.com/Hieubkav/wincellarCloneBackend --skill frontend-components-hieubkav

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides Claude Code to craft reusable, well-documented UI components with clear interfaces and encapsulation.

Core Features & Use Cases

  • Single-responsibility components with explicit props
  • Composition patterns (cards, buttons, modals)
  • Documented APIs and usage examples
  • Clear naming, state management, and encapsulation guidance

Quick Start

Define a component with a clear API, export subcomponents, document props, and showcase usage examples.

Frequently Asked Questions about Frontend Components

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design reusable UI components with clean APIs?

Design reusable UI components by defining single-responsibility components with explicit props, clear naming conventions, and encapsulated state. Document your API with prop types and usage examples, then export composed subcomponents to enable flexible composition patterns across React, Vue, Svelte, or web components.

Can I use composition patterns to build complex UI like cards, buttons, and modals?

Yes. Composition patterns let you build complex UI by combining single-responsibility components into larger structures. Define base components with minimal, explicit props, then compose them into cards, buttons, modals, and other patterns while maintaining clear interfaces and reusability across your component library.

What's the best way to structure TypeScript components for maximum reusability?

Structure TypeScript components with single responsibility, explicit prop interfaces, and clear encapsulation. Use minimal required props, descriptive naming, and documented APIs. Keep state management disciplined and export subcomponents to enable composition, making components reusable across different contexts and frameworks.

How do I document component APIs so other developers understand how to use them?

Document component APIs by defining clear prop interfaces with TypeScript types, adding usage examples showing common composition patterns, and explaining the component's single responsibility. Make documentation consumable by showing concrete examples of how to compose and configure each component.

Does this approach work across different frontend frameworks like React, Vue, and Svelte?

Yes. The core principles—single responsibility, explicit interfaces, encapsulation, and composition—apply across React, Vue, Svelte, and web components. File types vary (.jsx, .tsx, .vue, .svelte) but the design guidance for reusable, well-documented components remains consistent.

What should I avoid when building reusable components?

Avoid implicit props, unclear naming, and over-coupling components to specific use cases. Don't neglect documentation or API clarity, as this breaks reusability. Resist adding too many configuration options; keep props minimal and focused on single responsibility to maintain clarity and composability.