ui-component-design

Design reusable HTML, CSS, and JavaScript UI components with BEM patterns.

Updated Oct 29, 2025
One-click install
npx skills add https://github.com/FAeN399/Skill-Repo --skill ui-component-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ui-component-design
Source: https://github.com/FAeN399/Skill-Repo/tree/main/ui-component-design
Command: npx skills add https://github.com/FAeN399/Skill-Repo --skill ui-component-design

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill creates a library of modular UI components with consistent APIs, improving maintainability and accelerating development across projects.

Core Features & Use Cases

  • Base component architecture: clear separation of concerns and scalable patterns.
  • Variants, states & accessibility: support primary/secondary, disabled, loading, and ARIA attributes.
  • Documentation & examples: self-contained components with usage examples and tests.
  • Use Case: team ships a consistent button, input, and card system across multiple apps.

Quick Start

Create a reusable button component with primary and secondary variants for your product suite.

Frequently Asked Questions about ui-component-design

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

FAQPage Schema
How do I build reusable UI components for multiple projects?

Design modular UI components with consistent APIs and documentation to create a shared component library. This approach reduces duplication, accelerates development across teams, and ensures visual and behavioral consistency by establishing base architecture, variant systems, and accessibility standards once.

What's the best way to structure a component library with CSS and JavaScript?

Use BEM-based CSS patterns for predictable styling, JavaScript class and factory patterns for component logic, and clear separation of concerns in your base architecture. This structure supports scalability, makes components testable, and enables teams to maintain and extend components without conflicts.

How do I make UI components accessible across a design system?

Implement ARIA attributes, semantic HTML, and keyboard navigation as part of your base component design. Document accessibility requirements alongside variant states and test against assistive technology to ensure your component library meets standards for all users.

Can I document and test components within the library itself?

Yes. Embed usage examples, test suites, and documentation directly in your component library so developers can reference and verify behavior without leaving the codebase. Self-contained components reduce onboarding time and prevent documentation drift.

Does this approach work for building buttons, inputs, and cards across multiple apps?

Yes. The component library supports all common UI elements—buttons with primary and secondary variants, inputs with states like disabled and loading, cards with configurable layouts—shared across multiple applications through a consistent props schema and API.

What's the difference between a component library and ad-hoc styling?

A component library provides versioned, tested, documented components with standardized variants and states, enabling teams to ship consistent interfaces at scale. Ad-hoc styling repeats patterns across projects, increases maintenance burden, and risks visual inconsistency.