react-component-library
Installation
SKILL.md
react-component-library {Frontend} (v1.0)
"Ship pixels that perform, accessible by default."
Purpose
React component library with Storybook. TypeScript interfaces, Jest/Testing Library tests, compound components. [EXPLICIT] When to use: Frontend development within the Firebase/Google/Hostinger stack.
Core Principles
- Law of Semantics: HTML first, CSS second, JS third. Semantic markup is non-negotiable. [EXPLICIT]
- Law of Performance: Lighthouse > 90. Lazy load images. Code-split routes. Critical CSS inline. [EXPLICIT]
- Law of Accessibility: WCAG 2.1 AA minimum. Keyboard navigable. Screen reader tested. ARIA where needed. [EXPLICIT]
Core Process
Phase 1: Structure
- Define page/component structure with semantic HTML5. [EXPLICIT]
- Apply design tokens from
.agent/.shared/design-tokens.md. [EXPLICIT] - Configure responsive breakpoints (mobile-first). [EXPLICIT]
Phase 2: Build
- Implement with framework (React/Angular) or vanilla HTML/CSS/JS. [EXPLICIT]
- Integrate Firebase services (Auth, Firestore listeners, Storage). [EXPLICIT]
- Add loading/error states for async operations. [EXPLICIT]
Phase 3: Validate
- Run Lighthouse audit (> 90 on all categories). [EXPLICIT]