Back to Skills

moai-component-designer

modu-ai
Updated Today
35 views
424
78
424
View on GitHub
Metareactaidesign

About

This Claude Skill helps developers build enterprise-grade component libraries using React 19, Vue 3.5, and Atomic Design patterns. It provides capabilities for creating accessible, production-ready UI components that comply with WCAG 2.1 AA standards. Use it when designing scalable component systems, implementing design tokens, or ensuring accessibility compliance in your applications.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/modu-ai/moai-adk
Git CloneAlternative
git clone https://github.com/modu-ai/moai-adk.git ~/.claude/skills/moai-component-designer

Copy and paste this command in Claude Code to install this skill

Documentation

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

FieldValue
Version4.0.0 Enterprise
Created2025-11-12
FrameworksReact 19, Vue 3.5, Svelte 5, Solid.js
Design SystemsMaterial Design 3, Chakra, Shadcn, Radix
AccessibilityWCAG 2.1 AA, ARIA patterns
ToolsStorybook 8.0, Figma, Chromatic
Tier4 (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:

  1. Pure presentational (no business logic)
  2. Single responsibility
  3. Highly reusable
  4. Type-safe with TypeScript
  5. Accessibility first
  6. 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:

  1. One story per component state
  2. Use controls for interactive props
  3. Include accessibility notes
  4. Link to design tokens
  5. Document accessibility requirements
  6. Visual regression setup
  7. Performance monitoring
  8. 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:

  • 100% TypeScript coverage
  • WCAG 2.1 AA compliance verified (axe testing)
  • All components keyboard navigable
  • Screen reader tested
  • <50KB gzipped library
  • >95% Lighthouse accessibility score
  • <100ms interaction response time
  • >95% test coverage
  • Design tokens documented
  • Storybook stories complete

GitHub Repository

modu-ai/moai-adk
Path: src/moai_adk/templates/.claude/skills/moai-component-designer
agentic-aiagentic-codingagentic-workflowclaudeclaudecodevibe-coding

Related Skills

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill

content-collections

Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill

llamaguard

Other

LlamaGuard is Meta's 7-8B parameter model for moderating LLM inputs and outputs across six safety categories like violence and hate speech. It offers 94-95% accuracy and can be deployed using vLLM, Hugging Face, or Amazon SageMaker. Use this skill to easily integrate content filtering and safety guardrails into your AI applications.

View skill