mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-27 03:46:50 -06:00
Fill, stroke, effect and layout grid rows drag to reorder by their grip (a handle shows over the
row, an insertion line where it lands, the row's label follows the pointer like a dragged layer;
Escape cancels; lists that differ across the selection have nothing to drag). New commands
`fill.move`, `stroke.move` and `grid.move {ids?, from, to}` join `effect.move` (lists bottom first,
one undo step; items keep everything, linked list styles are unlinked).
Variable bindings on list items follow their items when a list is reordered or shrinks:
paint colours bind per paint (`fills/<i>/color`, `strokes/<i>/color`; `fill`/`stroke` stay the
first paint's), so a moved bound paint keeps its variable and its neighbours are never recoloured.
`fill.remove`, `stroke.remove` and `grid.remove` refuse negative indices.
Layout grids get settings in the Design panel (size; count, type, width or height, margin or
offset, gutter; colour) whose numbers bind to number variables (`layoutGrids/<i>/<field>`),
re-applied on variable and mode changes. Instance boolean and text properties bind to boolean and
string variables (`componentProperties/<name>`, from the instance's properties panel), kept across
instance rebuilds, following property renames and dropped on delete, reset and detach.
Inspect names the variable of each paint.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
237 lines
16 KiB
Markdown
237 lines
16 KiB
Markdown
<p align="center">
|
|
<a href="https://getartcraft.com/">
|
|
<picture>
|
|
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/storytold/vectorcraft/main/docs/brand/artcraft-logo-white.png">
|
|
<img alt="ArtCraft" src="https://raw.githubusercontent.com/storytold/vectorcraft/main/docs/brand/artcraft-logo.png" width="200">
|
|
</picture>
|
|
</a>
|
|
</p>
|
|
|
|
<h1 align="center">FigCraft</h1>
|
|
|
|
<p align="center">
|
|
<b>Interface design; an open-source, clean-room reimplementation of Figma, rebuilt in pure Rust.</b><br>
|
|
Frames, auto layout, components and variants, vector networks, styles, variables and prototypes,<br>
|
|
in a native app that opens instantly and works offline. Open source, and yours.
|
|
</p>
|
|
|
|
<p align="center">
|
|
<img alt="100% Rust" src="https://img.shields.io/badge/100%25-Rust-b7410e?style=flat-square&logo=rust">
|
|
<img alt="macOS · Windows · Linux · FreeBSD · Web" src="https://img.shields.io/badge/macOS%20%C2%B7%20Windows%20%C2%B7%20Linux%20%C2%B7%20FreeBSD%20%C2%B7%20Web-native-0EA5C6?style=flat-square">
|
|
<img alt="License: MIT OR Apache-2.0" src="https://img.shields.io/badge/license-MIT%20%2F%20Apache--2.0-3a3a3a?style=flat-square">
|
|
<img alt="Status: early alpha" src="https://img.shields.io/badge/status-early%20alpha-d69e2e?style=flat-square">
|
|
</p>
|
|
|
|
<p align="center">
|
|
<a href="https://discord.gg/artcraft"><img alt="Join the ArtCraft community on Discord" src="https://img.shields.io/badge/Join%20us%20on%20Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" height="40"></a>
|
|
</p>
|
|
|
|
<p align="center">
|
|
<a href="https://getartcraft.com/apps/figcraft"><b>FigCraft on getartcraft.com</b></a> ·
|
|
<a href="https://getartcraft.com/">ArtCraft</a> ·
|
|
<a href="https://getartcraft.com/apps">All Crafting Apps</a>
|
|
</p>
|
|
|
|
<br>
|
|
|
|
> [!NOTE]
|
|
> **ArtCraft is a community of artists from all walks of life.** Designers, illustrators, developers,
|
|
> musicians, game makers — if you make things, you're one of us. **[Come say hi on Discord](https://discord.gg/artcraft).**
|
|
|
|
<p align="center">
|
|
<a href="#features">Features</a> ·
|
|
<a href="#built-for-agents">Agents</a> ·
|
|
<a href="#under-the-hood">Under the hood</a> ·
|
|
<a href="#get-started">Get started</a> ·
|
|
<a href="#the-crafting-apps">Crafting Apps</a> ·
|
|
<a href="https://discord.gg/artcraft">Discord</a>
|
|
</p>
|
|
|
|
<br>
|
|
|
|
<table>
|
|
<tr>
|
|
<td width="25%" valign="top">
|
|
<h3>🎛️ Familiar by design</h3>
|
|
The toolbar, layers panel, Design panel, menus and shortcuts sit where your hands expect them. If you know Figma, you already know FigCraft.
|
|
</td>
|
|
<td width="25%" valign="top">
|
|
<h3>⚡ Native and fast</h3>
|
|
A Rust engine with a persistent document model: edits touch only what changed, so creating a node in a 20,000-node file takes a fraction of a millisecond. No Electron, no web view.
|
|
</td>
|
|
<td width="25%" valign="top">
|
|
<h3>🔌 Offline and private</h3>
|
|
Your files are plain <code>.figcraft</code> archives on your own disk. No account, no cloud, no telemetry. SVG, PNG, JPG, WebP and PDF in and out; designs exported as the public REST API file JSON import too, with their prototypes and variables.
|
|
</td>
|
|
<td width="25%" valign="top">
|
|
<h3>🤖 Agent-ready</h3>
|
|
Every menu item, tool and drag is a command, so the same engine runs from the UI, the CLI, a JSON control channel or an MCP server.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
## Features
|
|
|
|
<table>
|
|
<tr>
|
|
<td width="50%" valign="top">
|
|
<h3>Layouts that build themselves</h3>
|
|
Auto layout in both directions, with wrap and grid (fixed, hug and `fr` tracks, cells that span), padding, gaps, alignment including text baselines, Hug / Fill / Fixed sizing, min and max sizes, absolute positioning, drag handles for padding and spacing right on the canvas, and arrow keys that move children through the flow, grid cells and nested frames. Constraints and layout grids for everything else.
|
|
</td>
|
|
<td width="50%" valign="top">
|
|
<h3>Components that scale</h3>
|
|
Main components, instances with overrides that survive edits, component sets with variants, properties, swap instance, detach, reset overrides and go to main component, and an Assets panel with live thumbnails, search and drag-to-canvas into frames and auto layout. Local styles and variables (colour, number, string, boolean) with modes, aliases and scopes, edited in a Variables table and bound to fills, strokes, effects, layout grids and instance properties. Fills, strokes, effects and layout grids reorder by dragging their rows.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="50%" valign="top">
|
|
<h3>Vectors without compromise</h3>
|
|
Real vector networks: the Pen and Pencil tools, vector edit mode with its own tools (pen that extends and branches paths, bend, paint bucket fills for any closed area, lasso, cut), point panel with handle mirroring and per-point corner radius, join, split and heal-on-delete, the shape builder (click or drag across the regions of overlapping shapes to merge them, Alt to remove them), boolean groups (union, subtract, intersect, exclude), flatten, outline stroke, arrowheads, dashes, per-side strokes and variable width strokes (width profile presets, and a Variable width tool that drags width points along the path). Rectangles with smooth (squircle) corners, polygons, stars and arcs.
|
|
</td>
|
|
<td width="50%" valign="top">
|
|
<h3>Paints and effects</h3>
|
|
Solid, linear, radial, angular and diamond gradients with on-canvas handles, image fills (fill, fit, crop, tile) with adjustments and presets, multiple fills and strokes, every blend mode, drop and inner shadows (spread offsets the outline exactly), layer and background blur, noise (mono, duo, multi), texture and glass (refraction, dispersion, frost, light), masks. Files are sRGB or Display P3, with exports tagged with the file's colour profile.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="50%" valign="top">
|
|
<h3>Type that sets beautifully</h3>
|
|
Text edited in place on the canvas (with inline IME composition), mixed styles within a paragraph, auto width and auto height, line height, letter and paragraph spacing, decoration, case, lists, OpenType features, variable font axes and text styles, right-to-left and mixed-direction text (Arabic, Hebrew) with the Unicode bidi algorithm, shaped with HarfRust and the open fonts from craft-fonts plus your system fonts.
|
|
</td>
|
|
<td width="50%" valign="top">
|
|
<h3>Prototype and hand off</h3>
|
|
Connections, triggers, actions and Smart Animate-style transitions, flows, a presentation view with device frames and a live preview pane. Alt to measure distances and padding on the canvas, Inspect mode with measurements, annotations, a ready-for-dev list and code (CSS, HTML, React, SwiftUI, Compose) where components take their properties as parameters, comment threads pinned to frames (replies, @mentions, reactions, read state) and named version history. Export any layer at any scale to PNG, JPG, WebP, SVG or PDF.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
## Built for agents
|
|
|
|
Every menu item, tool and gesture runs a command from one registry of 400+ commands. The UI, the CLI, the JSON control channel and the MCP server all call the same commands, so anything you can click, a script or an AI agent can do too.
|
|
|
|
```sh
|
|
# Headless: render and export
|
|
figcraft-cli render landing.figcraft -o landing.png --scale 2
|
|
figcraft-cli export landing.figcraft -o out/ --format svg
|
|
|
|
# Run a script of commands without a window
|
|
figcraft-cli run build-card.json --out card.figcraft
|
|
|
|
# Every command, with its parameters
|
|
figcraft-cli commands --filter autoLayout
|
|
|
|
# Let an agent drive it over MCP (headless, or attached to the running app)
|
|
figcraft-cli mcp
|
|
figcraft-cli mcp --attach 47800
|
|
```
|
|
|
|
The desktop app also offers a loopback-only control channel (`figcraft --control <port>`) for inspecting UI state, driving tools with pointer and key events, and taking screenshots. See [`docs/control-protocol.md`](docs/control-protocol.md), [`docs/mcp.md`](docs/mcp.md) and [`docs/cli.md`](docs/cli.md).
|
|
|
|
## Under the hood
|
|
|
|
- **Engine first:** a pure-data document model and a command engine, with a thin, swappable egui UI on top. Layering is checked at build time across the workspace crates (`cargo xtask layers`).
|
|
- **Persistent data:** the document lives in an immutable ordered map, so undo snapshots are cheap and layout, component sync and text measurement only revisit what changed.
|
|
- **Its own renderer:** tiny-skia on every core for the canvas and exports, with layer blending, effects and masks; booleans from linesweeper, geometry from kurbo, text from skrifa and HarfRust.
|
|
- **Runs in the browser:** the whole engine and UI compile to WebAssembly.
|
|
- **Never crashes:** no `unwrap`, `expect` or `panic` in shipped code, enforced by clippy; commands run behind a guard so a bug fails one action, not your session.
|
|
- **Clean-room:** implemented from public documentation and observed behaviour only. No proprietary code, file formats, icons or images.
|
|
|
|
## Get started
|
|
|
|
```sh
|
|
git clone https://github.com/storytold/figcraft
|
|
cd figcraft
|
|
cargo run --release -p figcraft # the desktop app
|
|
cargo test --workspace # the test suite
|
|
cargo xtask ci # fmt, clippy, tests, layering and asset checks
|
|
```
|
|
|
|
Fonts for the UI and the Text tool come from [craft-fonts](https://github.com/storytold/craft-fonts), cloned next to this repository (`../craft-fonts`); without it FigCraft falls back to your system fonts.
|
|
|
|
```sh
|
|
git clone https://github.com/storytold/craft-fonts ../craft-fonts
|
|
```
|
|
|
|
For the web build, install [trunk](https://trunkrs.dev/) and run `cargo xtask wasm`.
|
|
|
|
New contributors and AI agents: start with [`AGENTS.md`](AGENTS.md), then [`docs/`](docs/).
|
|
|
|
Installers for macOS (universal, signed and notarized), Windows (x64, x86 and arm64), Linux (AppImage, `.deb`, `.rpm`, Flatpak and tarball), FreeBSD and the web are attached to each [GitHub release](https://github.com/storytold/figcraft/releases). Maintainers: [`docs/releasing.md`](docs/releasing.md) explains how releases are built, signed and published.
|
|
|
|
> [!IMPORTANT]
|
|
> **Status:** FigCraft is in early alpha. Most of Figma's editor surface exists in some form, and the main menu is almost fully wired ([`docs/parity.md`](docs/parity.md)), but that measures wiring, not behaviour. Multiplayer, comments, version history, plugins and Dev Mode depth are not there yet. The honest, area-by-area picture is in the [roadmap](ROADMAP.md). Expect rough edges and please file issues, or tell us what broke on [Discord](https://discord.gg/artcraft).
|
|
|
|
## The Crafting Apps
|
|
|
|
FigCraft is one of the **Crafting Apps**: free, open-source creative tools from the
|
|
[ArtCraft](https://getartcraft.com/) team, each written from scratch in Rust and each able to
|
|
stand on its own.
|
|
|
|
| | App | What it's for | Code | Learn more |
|
|
|:-:|---|---|---|---|
|
|
| <img src="assets/app-icon/hicolor/64x64/apps/ai.storyteller.figcraft.png" alt="" width="32" height="32"> | **FigCraft** | **Interface design, components and prototypes · you are here** | [GitHub](https://github.com/storytold/figcraft) | [Website](https://getartcraft.com/apps/figcraft) |
|
|
| <img src="https://raw.githubusercontent.com/storytold/photocraft/main/assets/app-icon/hicolor/64x64/apps/ai.storyteller.photocraft.png" alt="" width="32" height="32"> | **PhotoCraft** | Image editing | [GitHub](https://github.com/storytold/photocraft) | [Website](https://getartcraft.com/apps/photocraft) |
|
|
| <img src="https://raw.githubusercontent.com/storytold/vectorcraft/main/assets/app-icon/hicolor/64x64/apps/ai.storyteller.vectorcraft.png" alt="" width="32" height="32"> | **VectorCraft** | Vector illustration | [GitHub](https://github.com/storytold/vectorcraft) | [Website](https://getartcraft.com/apps/vectorcraft) |
|
|
| <img src="https://raw.githubusercontent.com/storytold/filmcraft/main/assets/app-icon/hicolor/64x64/apps/ai.storyteller.filmcraft.png" alt="" width="32" height="32"> | **FilmCraft** | Video editing, color and sound | [GitHub](https://github.com/storytold/filmcraft) | [Website](https://getartcraft.com/apps/filmcraft) |
|
|
| <img src="https://raw.githubusercontent.com/storytold/lightcraft/main/assets/app-icon/hicolor/64x64/apps/ai.storyteller.lightcraft.png" alt="" width="32" height="32"> | **LightCraft** | Photo library and raw development | [GitHub](https://github.com/storytold/lightcraft) | [Website](https://getartcraft.com/apps/lightcraft) |
|
|
| <img src="https://raw.githubusercontent.com/storytold/pdfcraft/main/assets/app-icon/hicolor/64x64/apps/ai.storyteller.pdfcraft.png" alt="" width="32" height="32"> | **PdfCraft** | Reading, organizing and protecting PDFs | [GitHub](https://github.com/storytold/pdfcraft) | [Website](https://getartcraft.com/apps/pdfcraft) |
|
|
| <img src="https://raw.githubusercontent.com/storytold/effectcraft/main/assets/app-icon/hicolor/64x64/apps/ai.storyteller.effectcraft.png" alt="" width="32" height="32"> | **EffectCraft** | Motion graphics and visual effects | [GitHub](https://github.com/storytold/effectcraft) | [Website](https://getartcraft.com/apps/effectcraft) |
|
|
| <img src="https://raw.githubusercontent.com/storytold/designcraft/main/assets/app-icon/hicolor/64x64/apps/ai.storyteller.designcraft.png" alt="" width="32" height="32"> | **DesignCraft** | Page layout and publishing | [GitHub](https://github.com/storytold/designcraft) | [Website](https://getartcraft.com/apps/designcraft) |
|
|
|
|
And [**ArtCraft**](https://getartcraft.com/) itself, our AI image and video studio for artists who want real control.
|
|
|
|
The Crafting Apps share the same conventions: clean-room and pure Rust, native on macOS, Windows, Linux and FreeBSD, in the browser via WebAssembly, and fully drivable by agents.
|
|
|
|
<br>
|
|
|
|
<p align="center">
|
|
<a href="https://discord.gg/artcraft"><img alt="Join the ArtCraft community on Discord" src="https://img.shields.io/badge/Join%20us%20on%20Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" height="40"></a>
|
|
</p>
|
|
|
|
<h3 align="center">Come make things with us</h3>
|
|
|
|
<p align="center">
|
|
Our Discord is where people who make things hang out: designers sketching their first app,
|
|
developers who just want a button to look right, illustrators, filmmakers, type nerds, and
|
|
plenty of people still working out what they like to make. Share what you're building, ask for
|
|
help, tell us what's broken or what you wish FigCraft could do. You're welcome here.
|
|
</p>
|
|
|
|
<p align="center">
|
|
<a href="https://discord.gg/artcraft"><b>discord.gg/artcraft</b></a> ·
|
|
<a href="https://getartcraft.com/">getartcraft.com</a> ·
|
|
<a href="https://getartcraft.com/apps">The Crafting Apps</a> ·
|
|
<a href="https://getartcraft.com/apps/figcraft">FigCraft</a>
|
|
</p>
|
|
|
|
---
|
|
|
|
## License and credits
|
|
|
|
FigCraft is dual-licensed under [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE), at your option.
|
|
Copyright (c) 2026 ArtCraft Team and the FigCraft contributors. Required notices are in [NOTICE](NOTICE).
|
|
|
|
Every icon in FigCraft is drawn in code or made for this project, and bundled fonts, images and other
|
|
assets keep their own open licenses; each one is listed with its author, source and license in
|
|
[ATTRIBUTION.md](ATTRIBUTION.md).
|
|
|
|
The ArtCraft name, wordmark and logos in [`docs/brand/`](docs/brand/) are trademarks of the
|
|
ArtCraft Team and are not covered by this license. They may be used only unmodified, and only as
|
|
part of this repository and FigCraft, under [`docs/brand/LICENSE-brand.txt`](docs/brand/LICENSE-brand.txt).
|
|
Forks and modified versions must remove them.
|
|
|
|
<sub>Figma is a trademark of Figma, Inc. FigCraft is an independent, open-source project and is not affiliated with, sponsored by or endorsed by Figma, Inc.; the name is used only to describe the workflows FigCraft is compatible with.</sub>
|
|
|
|
<p align="center">
|
|
<a href="https://getartcraft.com/"><img alt="ArtCraft" src="https://raw.githubusercontent.com/storytold/vectorcraft/main/docs/brand/artcraft-mark.png" width="28"></a><br>
|
|
<sub>Made by the <a href="https://getartcraft.com/">ArtCraft</a> team and community.</sub>
|
|
</p>
|
|
|
|
## Star history
|
|
|
|
[](https://www.star-history.com/?repos=storytold%2Ffigcraft&type=date&legend=top-left)
|