Enterprise Component Designer & Accessible UI Architecture
Enterprise Component Capabilities
Modern Framework Integration:
- React 19 with server components and async rendering
- Vue 3.5 with composition API and reactive systems
- Svelte 5 with rune-based reactivity
- Solid.js for fine-grained reactivity
Atomic Design & Component Systems:
- Atoms, Molecules, Organisms architecture
- Design tokens and theme systems
- Component composition patterns
- Storybook 8.0 integration
Accessibility Standards:
- WCAG 2.1 AA compliance
- ARIA patterns and semantics
- Keyboard navigation
- Screen reader optimization
- Focus management
- Color contrast validation
Production Design Systems:
- Material Design 3
- Chakra UI patterns
- Shadcn/UI architecture
- Radix UI primitives
Skill Metadata
| Field |
Value |
| Version |
4.0.0 Enterprise |
| Created |
2025-11-12 |
| Frameworks |
React 19, Vue 3.5, Svelte 5, Solid.js |
| Design Systems |
Material Design 3, Chakra, Shadcn, Radix |
| Accessibility |
WCAG 2.1 AA, ARIA patterns |
| Tools |
Storybook 8.0, Figma, Chromatic |
| Tier |
4 (Enterprise) |
Component Architecture Deep Dive
Level 1: Atomic Foundation
Atoms (Basic UI elements):
- Button component with variants (solid, outline, ghost, link)
- Input field with validation states
- Label with accessibility attributes
- Icon wrapper with sizing
- Badge with semantic colors
- Text variants (heading, body, caption)
Atomic Design Principles:
- Pure presentational (no business logic)
- Single responsibility
- Highly reusable
- Type-safe with TypeScript
- Accessibility first
- Visual regression tested
Level 2: Molecules (Component Combinations)
Molecular Components:
- Form group (label + input + validation feedback)
- Card with header/footer/actions
- Navigation menu item
- Search input with autocomplete
- Modal with focus trap
- Tooltip with positioning
- Dropdown with keyboard support
- Progress bar with labels
- Alert box with actions
- Tag input with removal
Composition Strategies:
- Props composition for flexibility
- Render props pattern
- Compound components (Dialog.Trigger, Dialog.Content)
- Slots/composition API (Vue)
- Context-based shared state
Level 3: Organisms (Complex UI Sections)
Organism Components:
- Data table (sorting, filtering, pagination)
- Form with multi-step validation
- Navigation header with dropdown
- Sidebar layout with responsive collapse
- Dialog/Modal systems with overlay
- Breadcrumb navigation
- Pagination component
- Tabs interface
- Accordion/Disclosure
- Tree view with keyboard nav
Advanced Patterns:
- Virtual scrolling for large lists
- Infinite scroll implementation
- Lazy loading with suspense
- Keyboard navigation matrix
- Focus management
- Accessible overlays
Accessibility & WCAG 2.1 AA
Keyboard Navigation
Standard patterns:
- Tab: Move to next focusable element
- Shift+Tab: Move to previous
- Enter: Activate button/submit
- Space: Toggle checkbox/radio
- Arrow keys: Navigate lists/menus
- Escape: Close modals/dropdowns
- Home/End: Jump to start/end
Implementation:
- tabindex management (0, -1)
- Focus visible styles
- Skip links
- Focus traps in modals
- Logical tab order
Screen Reader Support
Semantic HTML:
- Use
<button> for buttons (not <div>)
- Use
<label> for form inputs
- Use
<nav>, <main>, <article>
- Proper heading hierarchy (
<h1> to <h6>)
- List elements for lists
ARIA Attributes:
aria-label: Accessible name
aria-describedby: Description link
aria-invalid: Form error state
aria-live: Dynamic content updates
aria-expanded: Toggle states
aria-hidden: Hide decorative elements
role: Custom element semantics
Live Regions:
- Alert notifications
- Status updates
- Loading states
- Form validation feedback
- Search results
Visual Accessibility
Color Contrast:
- 4.5:1 for normal text (WCAG AA)
- 3:1 for large text (18pt+)
- Color + icon/pattern (not color alone)
- Test with tools: WebAIM, Stark
Focus Indicators:
- Minimum 2px visible focus ring
- Sufficient contrast
- Not removed with CSS reset
- Consistent styling
Responsive Design:
- Touch targets minimum 44x44px
- Text sizing support
- Zoom compatibility (200%)
- Mobile-first approach
- Orientation support
Motion & Animation:
- Respect
prefers-reduced-motion
- Avoid flashing content
- Auto-play disabled
- Pause controls for video/animation
Design System Architecture
Token System
Color Tokens:
Primary, Secondary, Success, Warning, Error, Info
Light & Dark variants
Semantic naming (on-primary, background, surface)
WCAG contrast pre-validated
Spacing Scale:
Base unit: 4px
Scale: 4, 8, 12, 16, 24, 32, 48, 64, 96
Padding, margin, gaps
Responsive breakpoints
Touch-friendly (min 44px)
Typography:
Font families: system, serif, monospace
Sizes: 12px to 64px scale
Line height: 1.2 to 1.8 ratios
Font weights: 400, 500, 600, 700
Letter spacing adjustments
Motion & Animation:
Short: 150ms (hover, focus)
Medium: 300ms (transitions)
Long: 500ms+ (entrances, exits)
Easing: ease-out, ease-in-out, ease-in
Respect prefers-reduced-motion
Component State Model
Universal States:
- Default/Rest: Initial state
- Hover: Mouse over
- Focus: Keyboard focus
- Active: Pressed/selected
- Disabled: Non-interactive
- Loading: Async operation
- Error: Validation failure
- Success: Action completed
State Implementation:
- Data attributes (
data-state)
- CSS classes
- CSS variables
- Component state (React, Vue)
- Compound component pattern
React 19 Examples
1. Button Component
- Variants: solid, outline, ghost, link
- Sizes: xs, sm, md, lg, xl
- Colors: primary, secondary, success, error
- States: default, hover, focus, disabled, loading
- Type-safe with TypeScript generics
- Accessibility: aria-label, aria-disabled, role
2. Form Input System
- Text, email, password, number, date, select
- Real-time validation feedback
- Error message display
- Helper text support
- Label integration with for/id
- Accessibility: aria-describedby, aria-invalid, aria-required
3. Modal Dialog
- Focus trap with FocusLock library
- Keyboard escape handling
- Scroll lock on body
- ARIA dialog pattern
- Smooth enter/exit animations
- Backdrop click handling
4. Data Table
- Column sorting with indicators
- Row filtering
- Pagination controls
- Responsive horizontal scroll
- Selection checkboxes
- Keyboard navigation (arrow keys)
- Accessibility: caption, thead/tbody, aria-sort, aria-label
5. Tabs Component
- Keyboard navigation (arrow keys, Home, End)
- Accessible names with aria-label
- Active state indication
- ARIA tabs pattern
- Lazy loading support
- Customizable indicators
Vue 3.5 Composition API Examples
1. useButton Composable
- Variant and size handling
- State management (hover, focus, active)
- Event handling
- Type-safe props
- Return reactive button state
2. useForm Composable
- Form field registration
- Validation orchestration
- Error tracking
- Dirty/touched states
- Submit handling
- Reset functionality
3. useModal Composable
- Open/close state
- Focus trap management
- Keyboard escape handling
- Ref forwarding
- Animated enter/exit
- Custom close handlers
4. useDataTable Composable
- Sorting management
- Filtering logic
- Pagination state
- Selection handling
- Keyboard navigation
- Performance optimization
5. useAccessibility Composable
- Focus management
- ARIA attribute generation
- Keyboard event handling
- Live region updates
- Screen reader announcements
Storybook 8.0 Integration
Story Organization:
- Atoms (basic components)
- Molecules (combinations)
- Organisms (complex UI)
- Templates (page layouts)
- Pages (full examples)
Story Best Practices:
- One story per component state
- Use controls for interactive props
- Include accessibility notes
- Link to design tokens
- Document accessibility requirements
- Visual regression setup
- Performance monitoring
- Component API documentation
Accessibility Testing in Storybook:
- Axe accessibility addon
- Color contrast checker
- Keyboard navigation testing
- Screen reader annotation
Production Considerations
Performance
Component optimization:
- React.memo for pure components
- Lazy loading with Suspense
- Virtual scrolling for lists (1000+ items)
- Code splitting by route
- Tree shaking unused code
- Bundle size monitoring
Runtime performance:
- Avoid inline objects/functions
- Batch state updates
- Use keys in lists
- Optimize re-renders
- Use web workers for heavy computation
Testing Strategy
Test coverage targets:
- Unit tests: >90% (component logic)
- Integration tests: Interaction flows
- Visual regression: Storybook + Chromatic
- Accessibility: axe testing
- E2E: Critical user journeys
- Performance: Lighthouse + Web Vitals
Documentation
Component documentation:
- Usage examples
- Props API table
- Accessibility requirements
- Design tokens used
- Related components
- Common patterns
- Migration guides
- Troubleshooting
Deployment
Release process:
- Semantic versioning
- Changelog generation
- Breaking changes documentation
- Migration guides
- Design token versioning
- Component API stability
Enterprise Checklist:
1---2name: moai-component-designer3description: Enterprise-grade component design and architecture with React 19, Vue 3.5, Atomic Design patterns, accessibility standards (WCAG 2.1 AA), design systems, and production-ready component libraries. Use when building reusable component systems, designing component libraries, implementing Atomic Design, ensuring accessibility compliance, or creating scalable UI architectures.4---5
6
7# Enterprise Component Designer & Accessible UI Architecture
8
9## Enterprise Component Capabilities
10
11**Modern Framework Integration**:
12- React 19 with server components and async rendering
13- Vue 3.5 with composition API and reactive systems
14- Svelte 5 with rune-based reactivity
15- Solid.js for fine-grained reactivity
16
17**Atomic Design & Component Systems**:
18- Atoms, Molecules, Organisms architecture
19- Design tokens and theme systems
20- Component composition patterns
21- Storybook 8.0 integration
22
23**Accessibility Standards**:
24- WCAG 2.1 AA compliance
25- ARIA patterns and semantics
26- Keyboard navigation
27- Screen reader optimization
28- Focus management
29- Color contrast validation
30
31**Production Design Systems**:
32- Material Design 3
33- Chakra UI patterns
34- Shadcn/UI architecture
35- Radix UI primitives
36
37## Skill Metadata
38| Field | Value |
39| ----- | ----- |
40| **Version** | **4.0.0 Enterprise** |
41| **Created** | 2025-11-12 |
42| **Frameworks** | React 19, Vue 3.5, Svelte 5, Solid.js |
43| **Design Systems** | Material Design 3, Chakra, Shadcn, Radix |
44| **Accessibility** | WCAG 2.1 AA, ARIA patterns |
45| **Tools** | Storybook 8.0, Figma, Chromatic |
46| **Tier** | **4 (Enterprise)** |
47
48## Component Architecture Deep Dive
49
50### Level 1: Atomic Foundation
51
52**Atoms** (Basic UI elements):
53- Button component with variants (solid, outline, ghost, link)
54- Input field with validation states
55- Label with accessibility attributes
56- Icon wrapper with sizing
57- Badge with semantic colors
58- Text variants (heading, body, caption)
59
60**Atomic Design Principles**:
611. Pure presentational (no business logic)
622. Single responsibility
633. Highly reusable
644. Type-safe with TypeScript
655. Accessibility first
666. Visual regression tested
67
68### Level 2: Molecules (Component Combinations)
69
70**Molecular Components**:
71- Form group (label + input + validation feedback)
72- Card with header/footer/actions
73- Navigation menu item
74- Search input with autocomplete
75- Modal with focus trap
76- Tooltip with positioning
77- Dropdown with keyboard support
78- Progress bar with labels
79- Alert box with actions
80- Tag input with removal
81
82**Composition Strategies**:
83- Props composition for flexibility
84- Render props pattern
85- Compound components (Dialog.Trigger, Dialog.Content)
86- Slots/composition API (Vue)
87- Context-based shared state
88
89### Level 3: Organisms (Complex UI Sections)
90
91**Organism Components**:
92- Data table (sorting, filtering, pagination)
93- Form with multi-step validation
94- Navigation header with dropdown
95- Sidebar layout with responsive collapse
96- Dialog/Modal systems with overlay
97- Breadcrumb navigation
98- Pagination component
99- Tabs interface
100- Accordion/Disclosure
101- Tree view with keyboard nav
102
103**Advanced Patterns**:
104- Virtual scrolling for large lists
105- Infinite scroll implementation
106- Lazy loading with suspense
107- Keyboard navigation matrix
108- Focus management
109- Accessible overlays
110
111## Accessibility & WCAG 2.1 AA
112
113### Keyboard Navigation
114
115**Standard patterns**:
116```
117- Tab: Move to next focusable element
118- Shift+Tab: Move to previous
119- Enter: Activate button/submit
120- Space: Toggle checkbox/radio
121- Arrow keys: Navigate lists/menus
122- Escape: Close modals/dropdowns
123- Home/End: Jump to start/end
124```
125
126**Implementation**:
127- tabindex management (0, -1)
128- Focus visible styles
129- Skip links
130- Focus traps in modals
131- Logical tab order
132
133### Screen Reader Support
134
135**Semantic HTML**:
136- Use `<button>` for buttons (not `<div>`)
137- Use `<label>` for form inputs
138- Use `<nav>`, `<main>`, `<article>`
139- Proper heading hierarchy (`<h1>` to `<h6>`)
140- List elements for lists
141
142**ARIA Attributes**:
143- `aria-label`: Accessible name
144- `aria-describedby`: Description link
145- `aria-invalid`: Form error state
146- `aria-live`: Dynamic content updates
147- `aria-expanded`: Toggle states
148- `aria-hidden`: Hide decorative elements
149- `role`: Custom element semantics
150
151**Live Regions**:
152- Alert notifications
153- Status updates
154- Loading states
155- Form validation feedback
156- Search results
157
158### Visual Accessibility
159
160**Color Contrast**:
161- 4.5:1 for normal text (WCAG AA)
162- 3:1 for large text (18pt+)
163- Color + icon/pattern (not color alone)
164- Test with tools: WebAIM, Stark
165
166**Focus Indicators**:
167- Minimum 2px visible focus ring
168- Sufficient contrast
169- Not removed with CSS reset
170- Consistent styling
171
172**Responsive Design**:
173- Touch targets minimum 44x44px
174- Text sizing support
175- Zoom compatibility (200%)
176- Mobile-first approach
177- Orientation support
178
179**Motion & Animation**:
180- Respect `prefers-reduced-motion`
181- Avoid flashing content
182- Auto-play disabled
183- Pause controls for video/animation
184
185## Design System Architecture
186
187### Token System
188
189**Color Tokens**:
190```
191Primary, Secondary, Success, Warning, Error, Info
192Light & Dark variants
193Semantic naming (on-primary, background, surface)
194WCAG contrast pre-validated
195```
196
197**Spacing Scale**:
198```
199Base unit: 4px
200Scale: 4, 8, 12, 16, 24, 32, 48, 64, 96
201Padding, margin, gaps
202Responsive breakpoints
203Touch-friendly (min 44px)
204```
205
206**Typography**:
207```
208Font families: system, serif, monospace
209Sizes: 12px to 64px scale
210Line height: 1.2 to 1.8 ratios
211Font weights: 400, 500, 600, 700
212Letter spacing adjustments
213```
214
215**Motion & Animation**:
216```
217Short: 150ms (hover, focus)
218Medium: 300ms (transitions)
219Long: 500ms+ (entrances, exits)
220Easing: ease-out, ease-in-out, ease-in
221Respect prefers-reduced-motion
222```
223
224### Component State Model
225
226**Universal States**:
227- Default/Rest: Initial state
228- Hover: Mouse over
229- Focus: Keyboard focus
230- Active: Pressed/selected
231- Disabled: Non-interactive
232- Loading: Async operation
233- Error: Validation failure
234- Success: Action completed
235
236**State Implementation**:
237- Data attributes (`data-state`)
238- CSS classes
239- CSS variables
240- Component state (React, Vue)
241- Compound component pattern
242
243## React 19 Examples
244
245### 1. Button Component
246- Variants: solid, outline, ghost, link
247- Sizes: xs, sm, md, lg, xl
248- Colors: primary, secondary, success, error
249- States: default, hover, focus, disabled, loading
250- Type-safe with TypeScript generics
251- Accessibility: aria-label, aria-disabled, role
252
253### 2. Form Input System
254- Text, email, password, number, date, select
255- Real-time validation feedback
256- Error message display
257- Helper text support
258- Label integration with for/id
259- Accessibility: aria-describedby, aria-invalid, aria-required
260
261### 3. Modal Dialog
262- Focus trap with FocusLock library
263- Keyboard escape handling
264- Scroll lock on body
265- ARIA dialog pattern
266- Smooth enter/exit animations
267- Backdrop click handling
268
269### 4. Data Table
270- Column sorting with indicators
271- Row filtering
272- Pagination controls
273- Responsive horizontal scroll
274- Selection checkboxes
275- Keyboard navigation (arrow keys)
276- Accessibility: caption, thead/tbody, aria-sort, aria-label
277
278### 5. Tabs Component
279- Keyboard navigation (arrow keys, Home, End)
280- Accessible names with aria-label
281- Active state indication
282- ARIA tabs pattern
283- Lazy loading support
284- Customizable indicators
285
286## Vue 3.5 Composition API Examples
287
288### 1. useButton Composable
289- Variant and size handling
290- State management (hover, focus, active)
291- Event handling
292- Type-safe props
293- Return reactive button state
294
295### 2. useForm Composable
296- Form field registration
297- Validation orchestration
298- Error tracking
299- Dirty/touched states
300- Submit handling
301- Reset functionality
302
303### 3. useModal Composable
304- Open/close state
305- Focus trap management
306- Keyboard escape handling
307- Ref forwarding
308- Animated enter/exit
309- Custom close handlers
310
311### 4. useDataTable Composable
312- Sorting management
313- Filtering logic
314- Pagination state
315- Selection handling
316- Keyboard navigation
317- Performance optimization
318
319### 5. useAccessibility Composable
320- Focus management
321- ARIA attribute generation
322- Keyboard event handling
323- Live region updates
324- Screen reader announcements
325
326## Storybook 8.0 Integration
327
328**Story Organization**:
329```
330- Atoms (basic components)
331- Molecules (combinations)
332- Organisms (complex UI)
333- Templates (page layouts)
334- Pages (full examples)
335```
336
337**Story Best Practices**:
3381. One story per component state
3392. Use controls for interactive props
3403. Include accessibility notes
3414. Link to design tokens
3425. Document accessibility requirements
3436. Visual regression setup
3447. Performance monitoring
3458. Component API documentation
346
347**Accessibility Testing in Storybook**:
348- Axe accessibility addon
349- Color contrast checker
350- Keyboard navigation testing
351- Screen reader annotation
352
353## Production Considerations
354
355### Performance
356
357**Component optimization**:
358- React.memo for pure components
359- Lazy loading with Suspense
360- Virtual scrolling for lists (1000+ items)
361- Code splitting by route
362- Tree shaking unused code
363- Bundle size monitoring
364
365**Runtime performance**:
366- Avoid inline objects/functions
367- Batch state updates
368- Use keys in lists
369- Optimize re-renders
370- Use web workers for heavy computation
371
372### Testing Strategy
373
374**Test coverage targets**:
375- Unit tests: >90% (component logic)
376- Integration tests: Interaction flows
377- Visual regression: Storybook + Chromatic
378- Accessibility: axe testing
379- E2E: Critical user journeys
380- Performance: Lighthouse + Web Vitals
381
382### Documentation
383
384**Component documentation**:
385- Usage examples
386- Props API table
387- Accessibility requirements
388- Design tokens used
389- Related components
390- Common patterns
391- Migration guides
392- Troubleshooting
393
394### Deployment
395
396**Release process**:
397- Semantic versioning
398- Changelog generation
399- Breaking changes documentation
400- Migration guides
401- Design token versioning
402- Component API stability
403
404---
405
406**Enterprise Checklist**:
407- [ ] 100% TypeScript coverage
408- [ ] WCAG 2.1 AA compliance verified (axe testing)
409- [ ] All components keyboard navigable
410- [ ] Screen reader tested
411- [ ] <50KB gzipped library
412- [ ] >95% Lighthouse accessibility score
413- [ ] <100ms interaction response time
414- [ ] >95% test coverage
415- [ ] Design tokens documented
416- [ ] Storybook stories complete