ghost-ui Svelte Themes

Ghost Ui

Capture any website's UI and generate production-ready React/Vue/Svelte components using AI vision


npm Chrome License AI Vision

TypeScript React Vue Svelte Tailwind Framer Motion


╔══════════════════════════════════════════════════════════════════════════════╗
β•‘                                                                              β•‘
β•‘   πŸ‘»  GHOST-UI: Steal like an artist (in 5 seconds)                         β•‘
β•‘                                                                              β•‘
β•‘       🎯  Point and click any element on any website                         β•‘
β•‘       πŸ“Ή  Record hover states, animations, interactions                      β•‘
β•‘       πŸ€–  AI Vision analyzes and generates clean code                        β•‘
β•‘       βš›οΈ   Output: React, Vue, Svelte, or Vanilla HTML/CSS                   β•‘
β•‘                                                                              β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

πŸš€ Quick Start Β· ✨ Features Β· 🎬 How It Works Β· βš™οΈ Configuration Β· πŸ–₯️ CLI Β· πŸ“– API




🎯 The Problem vs The Solution

❌ The Problem

You: *sees amazing navbar on Stripe*
You: *opens DevTools*
You: *sees 47 minified CSS classes*
You: *sees obfuscated JavaScript*
You: *cries*
You: *spends 3 hours recreating*

βœ… The Solution

You: *clicks Ghost-UI extension*
You: *hovers over the navbar*
You: *clicks "Stop"*

Ghost-UI: "Here's your Navbar.tsx
           with Framer Motion
           animations"

You: *ships feature before lunch*



πŸš€ Quick Start

  1. Install from Chrome Web Store or Firefox Add-ons
  2. Navigate to any website
  3. Click the Ghost-UI icon
  4. Select an element or record an interaction
  5. Get your code!

CLI (For Automation)

# Install globally
npm install -g ghost-ui

# Capture a static element
ghost-ui capture https://stripe.com --selector ".navbar" --output Navbar.tsx

# Record an interaction
ghost-ui record https://apple.com --duration 5s --output HeroAnimation.tsx



✨ Features

🎯 Visual Element Capture

Point and click to capture any element. Ghost-UI analyzes the visual appearance and generates semantic code.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       WHAT YOU SEE                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                           β”‚
β”‚  β”‚  β–ˆβ–ˆβ–ˆβ–ˆ  Stripe                   β”‚                           β”‚
β”‚  β”‚  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━   β”‚                           β”‚
β”‚  β”‚  Products β–Ό  Solutions β–Ό  ...   β”‚                           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                           β”‚
β”‚                                                                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                       WHAT YOU GET                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚  export function Navbar() {                                     β”‚
β”‚    return (                                                     β”‚
β”‚      <nav className="flex items-center justify-between">       β”‚
β”‚        <Logo />                                                 β”‚
β”‚        <NavLinks />                                             β”‚
β”‚        <CTAButton />                                            β”‚
β”‚      </nav>                                                     β”‚
β”‚    );                                                           β”‚
β”‚  }                                                              β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Ή Interaction Recording

Record hover states, click animations, scroll effects, and more:

// Captured from: apple.com hero section
export function HeroSection() {
  return (
    <motion.div
      initial={{ opacity: 0, y: 20 }}
      animate={{ opacity: 1, y: 0 }}
      transition={{ duration: 0.6, ease: "easeOut" }}
    >
      <h1 className="text-6xl font-semibold tracking-tight">
        iPhone 15 Pro
      </h1>
      <motion.p
        initial={{ opacity: 0 }}
        animate={{ opacity: 1 }}
        transition={{ delay: 0.3 }}
      >
        Titanium. So strong. So light. So Pro.
      </motion.p>
    </motion.div>
  );
}

🎨 Multiple Output Formats

Framework Status Animation Library
React + Tailwind βœ… Full Framer Motion
React + CSS Modules βœ… Full CSS Animations
Vue 3 + Tailwind βœ… Full Vue Transitions
Svelte βœ… Full Svelte Transitions
Vanilla HTML/CSS βœ… Full CSS Animations
React Native 🚧 Beta Reanimated

πŸ” Smart Animation Detection

Ghost-UI doesn't just screenshotβ€”it understands motion:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    ANIMATION DETECTION                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚  βœ…  CSS Transitions    β†’ Captures timing, easing, properties   β”‚
β”‚  βœ…  CSS Animations     β†’ Extracts keyframes                    β”‚
β”‚  βœ…  JS Animations      β†’ Records WAAPI, GSAP patterns          β”‚
β”‚  βœ…  Scroll Effects     β†’ Detects parallax, reveal animations   β”‚
β”‚  βœ…  Hover States       β†’ Captures interaction feedback         β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜



🎬 How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         GHOST-UI                                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚   Browser    │───▢│   Recorder   │───▢│   Screenshot    β”‚   β”‚
β”‚  β”‚  Extension   β”‚    β”‚  (Playwright)β”‚    β”‚   + DOM Snap    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                    β”‚            β”‚
β”‚                                                    β–Ό            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚   Output     │◀───│   Code Gen   │◀───│  Vision Model   β”‚   β”‚
β”‚  β”‚  Component   β”‚    β”‚   Engine     β”‚    β”‚  (GPT-4o/etc)   β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Step Action
1. Capture Browser extension or Playwright captures screenshot + computed styles + DOM structure
2. Analyze Vision-Language Model analyzes the visual design and interaction patterns
3. Generate Code generation engine outputs clean, semantic code in your chosen framework
4. Refine Optional iteration loop to adjust styling or behavior



βš™οΈ Configuration

Create ghost-ui.config.ts in your project:

import { defineConfig } from 'ghost-ui';

export default defineConfig({
  // Output settings
  output: {
    framework: 'react',        // 'react' | 'vue' | 'svelte' | 'vanilla'
    styling: 'tailwind',       // 'tailwind' | 'css-modules' | 'styled-components'
    animation: 'framer-motion', // 'framer-motion' | 'css' | 'gsap'
    typescript: true,
  },

  // AI settings
  ai: {
    provider: 'openai',        // 'openai' | 'anthropic' | 'local'
    model: 'gpt-4o',
    creativity: 0.3,           // 0-1, lower = more faithful to original
  },

  // Component settings
  component: {
    extractColors: true,       // Extract to CSS variables
    useSemanticHTML: true,     // Use proper HTML elements
    addA11y: true,             // Add ARIA attributes
    responsive: true,          // Generate responsive variants
  },

  // Recording settings
  recorder: {
    captureHover: true,
    captureClick: true,
    captureScroll: true,
    maxDuration: 10000,        // ms
  },
});



πŸ–₯️ CLI Commands

# Capture a single element
ghost-ui capture <url> --selector <css-selector>

# Record an interaction
ghost-ui record <url> --duration <time>

# Interactive mode (opens browser)
ghost-ui interactive <url>

# Convert existing screenshot to component
ghost-ui from-image ./screenshot.png

# Batch process multiple elements
ghost-ui batch --config ./captures.json

Examples

# Capture Stripe's pricing table
ghost-ui capture https://stripe.com/pricing \
  --selector ".pricing-table" \
  --framework react \
  --output PricingTable.tsx

# Record Apple's scroll animation
ghost-ui record https://apple.com/iphone \
  --duration 5s \
  --scroll \
  --output ScrollReveal.tsx

# Capture with custom AI prompt
ghost-ui capture https://linear.app \
  --selector ".issue-card" \
  --prompt "Make it dark mode with purple accents"



πŸ“– API Usage

import { GhostUI } from 'ghost-ui';

const ghost = new GhostUI({
  ai: { provider: 'openai', model: 'gpt-4o' },
  output: { framework: 'react', styling: 'tailwind' },
});

// Capture from URL
const component = await ghost.capture({
  url: 'https://stripe.com',
  selector: '.hero-section',
});

console.log(component.code);
// β†’ React component code

console.log(component.styles);
// β†’ Extracted styles

console.log(component.assets);
// β†’ Referenced images/icons



πŸ€– Local AI Support

Run completely offline with local models:

// ghost-ui.config.ts
export default defineConfig({
  ai: {
    provider: 'local',
    endpoint: 'http://localhost:11434',  // Ollama
    model: 'llava:34b',                   // Vision model
  },
});
Provider Link
Ollama with LLaVA ollama.ai
LocalAI localai.io
OpenAI-compatible Any endpoint



βš–οΈ Ethical Usage

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    GHOST-UI ETHICS                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚  βœ…  Learn from great designs                                   β”‚
β”‚  βœ…  Understand animation techniques                            β”‚
β”‚  βœ…  Speed up prototyping                                       β”‚
β”‚  βœ…  Study accessibility patterns                               β”‚
β”‚                                                                 β”‚
β”‚  ❌  Don't copy proprietary designs verbatim                    β”‚
β”‚  ❌  Don't violate copyright                                    β”‚
β”‚  ❌  Don't pass off others' work as your own                    β”‚
β”‚                                                                 β”‚
β”‚  ⚠️   Always credit inspiration and create original work        β”‚
β”‚                                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜



πŸ“Š Comparison

Feature Ghost-UI Screenshot-to-Code Figma-to-Code
Live website capture βœ… ❌ ❌
Animation capture βœ… ❌ ❌
Interaction recording βœ… ❌ ❌
Multiple frameworks βœ… React only Varies
Local AI support βœ… ❌ ❌
Browser extension βœ… ❌ ❌
CLI tool βœ… ❌ ❌



πŸ—ΊοΈ Roadmap

  • Chrome extension
  • Firefox extension
  • React + Tailwind output
  • Vue 3 support
  • Svelte support
  • Animation capture
  • Safari extension
  • React Native output
  • Figma plugin (export TO Figma)
  • Design system extraction
  • Component library generation



🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

git clone https://github.com/your-org/ghost-ui.git
cd ghost-ui
pnpm install
pnpm dev



πŸ“„ License

MIT License Β© Ghost-UI Contributors




πŸ‘» Ghost-UI β€” Stop reverse-engineering. Start shipping.


"Good artists copy. Great artists ship before lunch."


⬆ Back to Top

Top categories

Loading Svelte Themes