ui-component-architecture
Installation
SKILL.md
UI Component Architecture
Encapsulation shouldn't require a framework. This skill provides a pattern for building reusable components that are easy to drop into any project.
The Component Pattern
- The Template: A function that returns HTML as a template literal.
- The Styles: Encapsulated CSS (often using scoped selectors or Shadow DOM).
- The Logic: An init function that sets up listeners and internal state.
Folder Structure
components/
└── Card/
├── index.js # Component logic & template
└── style.css # Scoped styles