Docs/Development

Visual Builder

Production-ready Figma-like editor for designing React/Next.js applications.

Visual Builder Documentation

Overview

The Visual Builder is a production-ready Figma-like editor for designing React/Next.js applications. It combines drag-and-drop simplicity with the power of real code generation.

"Design visually. Export clean code. Ship production apps."


Key Features

FeatureDescription
580+ Pre-built BlocksReady-to-use UI components across 14 categories
40+ Base Componentsshadcn/ui components with full customization
AI Page GeneratorNatural language to production pages
Theme SystemOKLCH colors, 5+ presets, full customization
Responsive DesignBuilt-in breakpoint support
Data BindingConnect to APIs, state, localStorage
Event System40+ triggers with action chaining
TSX ExportClean, production-ready code

Block Library (580+ Blocks)

Categories Overview

CategoryBlocksDescription
Authentication65+Login, signup, password reset, 2FA, social auth
Forms50+Contact, feedback, survey, search, file upload
Navigation30+Headers, footers, sidebars, breadcrumbs
Marketing60+Hero sections, features, pricing, testimonials
Cards40+Product, profile, media, feature, stats
Dashboard50+Stats widgets, charts, activity feeds
Tables25+Data tables, comparison, list views
Commerce35+Products, cart, checkout, orders
Content40+Blog, articles, galleries, onboarding
Charts40+Area, bar, line, pie, radar, radial
AI Chat15+Chat interfaces, prompts, model selectors
UI Primitives40+Accordion, tabs, toggle, calendar
Overlay25+Sheet, drawer, dropdown, popover
Feedback25+Toast, skeleton, spinner, alerts

Authentication Blocks (65+)

Login Forms (15 variants)

Block IDNameStyle
login-01Simple LoginClean, minimal
login-social-02Social LoginGoogle, GitHub, etc.
login-split-03Split ScreenImage + form layout
login-floating-04Floating LabelsModern animation
login-dark-06Dark ThemeGradient border
login-magic-09Magic LinkPasswordless option
login-enterprise-10Enterprise SSOSAML integration

Signup Forms (15 variants)

Block IDNameFeatures
signup-01Simple SignupBasic form
signup-strength-02Password StrengthVisual meter
signup-wizard-03Multi-StepProgress wizard
signup-social-04Social OptionsOAuth providers
signup-plans-05Plan SelectionPricing tiers

AI Page Generator

How It Works

Natural Language → DSL → Component Tree → TSX Export

Example Prompt

"Create a modern SaaS dashboard with:
- Sidebar navigation with icons for Dashboard, Analytics, Users, Settings
- Header with search bar, notifications bell, and user avatar dropdown
- Main content area with:
  - 4 stats cards showing revenue, users, orders, conversion rate
  - Line chart for revenue over time
  - Recent activity feed
  - Data table with top products
- Dark theme with blue accent colors"

Theme System

OKLCH Color Space

All colors use OKLCH for perceptually uniform adjustments:

typescript
interface OKLCHColor {
  l: number;  // Lightness (0-1)
  c: number;  // Chroma (0-0.4)
  h: number;  // Hue (0-360)
}

Preset Themes

ThemeStylePrimary Color
VegaModern minimalBlue
NovaBold vibrantPurple
MaiaWarm earthyOrange
LyraCool professionalTeal
MiraPlayful colorfulPink

Responsive Design

Breakpoints

BreakpointWidthTarget
sm640px+Mobile landscape
md768px+Tablet
lg1024px+Laptop
xl1280px+Desktop
2xl1536px+Large desktop

Code Export

Generated Code Example

tsx
// Exported from Builder
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"
import { Button } from "@/components/ui/button"

export default function ProductCard({ product }) {
  return (
    <Card className="w-[350px]">
      <CardHeader>
        <CardTitle>{product.name}</CardTitle>
      </CardHeader>
      <CardContent className="space-y-4">
        <p className="text-muted-foreground">{product.description}</p>
        <div className="flex justify-between items-center">
          <span className="text-2xl font-bold">
            ${product.price.toFixed(2)}
          </span>
          <Button>Add to Cart</Button>
        </div>
      </CardContent>
    </Card>
  )
}

Keyboard Shortcuts

ShortcutAction
⌘ + SSave project
⌘ + ZUndo
⌘ + ⇧ + ZRedo
⌘ + CCopy component
⌘ + VPaste component
⌘ + DDuplicate
DeleteRemove selected
⌘ + GGroup components
Space + DragPan canvas
⌘ + ScrollZoom in/out