Labsco
boraalapgh logo

Figma β†’ Vue Design System

from boraalapgh

A Vue 3 component library with automated design token synchronization from Figma.

πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

Figma β†’ Vue Design System

A production-ready Vue 3 component library with automated Figma design token synchronization, comprehensive testing, and Storybook documentation.

Deploy with Vercel Storybook

✨ Features

  • 🎨 Figma Integration: Automated design token sync via MCP Server
  • ⚑ Vue 3: Composition API with TypeScript support
  • 🎯 Production Ready: Comprehensive testing and CI/CD pipeline
  • πŸ“š Storybook: Interactive component documentation
  • β™Ώ Accessibility: WCAG 2.1 AA compliant with axe-core testing
  • πŸŒ™ Dark Mode: Full dark theme support
  • πŸ“¦ Tree Shaking: Optimized bundle size with ESM exports
  • πŸ”„ Automated Versioning: Changeset-based release management

πŸ—οΈ Development

Prerequisites

  • Node.js β‰₯ 20 LTS
  • pnpm β‰₯ 8.0.0
  • Figma Desktop App (for design token sync)

Setup

# Clone the repository
git clone https://github.com/boraalapgh/figma-vue-design-system.git
cd figma-vue-design-system

# Install dependencies
pnpm install

# Start Storybook
pnpm storybook

# Run tests
pnpm test

# Build library
pnpm build:lib

πŸ“¦ Components

Button

Primary UI component with comprehensive variants and accessibility support.

<Button 
  variant="primary" 
  size="md" 
  :disabled="false"
  :loading="false"
  @click="handleClick"
>
  Click me
</Button>

Props:

  • variant: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'ghost'
  • size: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
  • disabled: boolean
  • loading: boolean
  • ariaLabel: string

🎨 Figma MCP Integration

Setup MCP Server

  1. Enable in Figma: Open Figma Desktop β†’ Preferences β†’ Enable Dev Mode MCP Server
  2. Configure Cursor: Add MCP server configuration in Cursor settings
{
  "mcpServers": {
    "Figma": {
      "url": "http://127.0.0.1:3845/sse"
    }
  }
}

Sync Design Tokens

# Sync tokens from Figma file
pnpm mcp-sync --file YOUR_FIGMA_FILE_KEY --out ./tokens

# This generates:
# - design-tokens.json (CSS variables)
# - components.schema.json (component definitions)
# - changelog-draft.md (proposed changes)

πŸ§ͺ Testing

  • Unit Tests: Component logic and props
  • Accessibility Tests: axe-core compliance
  • Visual Tests: Storybook test runner
  • Keyboard Navigation: Focus management