ui-component-patterns

Installation
Summary

Modern React component patterns for building scalable, maintainable UI libraries.

  • Covers five core patterns: props API design with TypeScript, composition, render props, custom hooks for logic separation, and performance optimization with React.memo and useMemo
  • Includes compound components, polymorphic components, and context-based state sharing for flexible, reusable architectures
  • Enforces single responsibility, accessibility standards (aria-*, role, tabindex), and prohibits prop drilling beyond five levels and inline functions
  • Provides file structure templates, component boilerplate with forwardRef, and real-world examples (Button, Card, Modal, Accordion, Dropdown)
SKILL.md

UI Component Patterns

When to use this skill

  • Building Component Libraries: Creating reusable UI components
  • Implementing Design Systems: Applying consistent UI patterns
  • Complex UI: Components requiring multiple variants (Button, Modal, Dropdown)
  • Refactoring: Extracting duplicate code into components

Instructions

Step 1: Props API Design

Design Props that are easy to use and extensible.

Principles:

  • Clear names
Related skills

More from supercent-io/skills-template

Installs
10.7K
GitHub Stars
88
First Seen
Jan 24, 2026