AI-Native Design Tool β Open-source visual communication between humans and AI agents.
Agent designs β Screenshot β Agent codes. Human reviews β Notes β Agent iterates.
Sand is an AI-first design tool where designs render actual React components. Unlike traditional design tools that use vector primitives, Sand renders real UI library components (daisyUI, your own design system) on an infinite canvas β what you see is literally what gets built.
| Light Mode | Dark Mode |
|---|---|
![]() |
![]() |
- π¨ Real Component Rendering β Designs use actual React components, not visual approximations
- π€ 13 MCP Tools β Full AI agent integration via Model Context Protocol (stdio)
- π¦ Adapter System β Bring your own UI library (daisyUI included, add any React lib)
- πΈ Screenshot Capture β Production-quality PNG exports for agent-driven code generation
- π¬ Notes & Comments β Human β Agent feedback loop with threaded conversations
- π Flexbox Layout β Auto-layout with gap, padding, alignment,
fill_containersizing - π Themes & Variables β Design tokens with multi-theme support (dark/light)
- β©οΈ Undo/Redo β Full history with Immer patches
- π± Responsive Design β Multiple breakpoint screens (Desktop/Tablet/Mobile)
- ποΈ File Format β
.sandJSON files, Git-friendly, Zod-validated
git clone https://github.com/kno-raziel/sand-canvas.git
cd sand-canvas
pnpm install
pnpm --filter @sand/editor dev # Editor at http://localhost:4003| Package | Description |
|---|---|
@sand/core |
Headless document engine β Zod schemas, node types, adapter interface, CSS-Class Engine |
@sand/mcp-server |
MCP stdio server with 13 tools for AI agent integration |
@sand/adapter-daisyui |
daisyUI component adapter β 14 components across 8 categories |
@sand/editor |
Vite + React canvas editor with @xyflow/react |
- Sand never generates code. Code generation is the agent's responsibility.
- Designs render actual React components β what you see is what gets built.
- Screenshots are the primary output β higher quality rendering β better agent code.
- Notes/comments close the feedback loop between human intent and agent execution.
- Bring your own UI library β adapters integrate any component library.
Sand includes a complete MCP server with 13 tools:
| Tool | Type | Description |
|---|---|---|
get_editor_state |
Read | Active document, open files, schema version |
batch_get |
Read | Read nodes by ID or search patterns |
batch_design |
Write | Insert/Update/Delete/Copy/Replace/Move/Generate operations |
open_document |
Utility | Open or create .sand files |
get_screenshot |
Read | DOM-to-PNG capture via WebSocket bridge |
snapshot_layout |
Read | Layout rectangles with problem detection |
get_variables / set_variables |
Read/Write | Design token and theme definitions |
find_empty_space |
Utility | Find available canvas space |
search_unique_properties |
Read | Find unique property values across a subtree |
replace_matching_properties |
Write | Bulk-replace property values |
get_guidelines |
Read | Design guidelines by topic |
reply_conversation |
Write | Reply to comment threads |
Sand's adapter system lets you integrate any React component library. Each adapter provides:
- A list of components with their prop schemas
- A render function for each component
- Default prop values
The daisyUI adapter uses the CSS-Class Engine β components are just ~10 lines of declarative data:
{
name: "Button",
element: "button",
baseClass: "btn",
modifiers: {
variant: { prefix: "btn-", values: ["primary", "secondary", "accent"] },
size: { prefix: "btn-", values: ["xs", "sm", "md", "lg"] },
},
booleans: { outline: { class: "btn-outline" } },
content: "label",
}For React component libraries, use the React Wrapper adapter pattern β see @sand/core docs.
Sand uses .sand files β JSON documents validated with Zod:
| Layer | Technology |
|---|---|
| Canvas | @xyflow/react v12+ |
| UI | React 19 |
| State | Zustand + Immer |
| Schema | Zod |
| Styling | Tailwind CSS 4 + daisyUI 5 |
| MCP | @modelcontextprotocol/sdk (stdio) |
| Screenshots | html-to-image |
| Build | Vite 7 |
See CONTRIBUTING.md for setup instructions, coding guidelines, and how to add components or create adapters.
MIT β Free for personal and commercial use.
Sand is inspired by Pencil.dev, the proprietary AI design tool. Sand is the open-source MIT alternative with one key differentiator: designs render actual React components.




{ "version": 1, "variables": { /* design tokens, themes */ }, "children": [ { "id": "screen-1", "type": "frame", "name": "Dashboard", "width": 1440, "height": 900, "layout": "vertical", "children": [ { "id": "title", "type": "text", "content": "Hello Sand!" }, { "id": "btn", "type": "ref", "ref": "daisyui-button" } ] } ] }