Skip to content
@lineadraw

Lineadraw

Web-based 2D CAD

Linea

Linea is a minimal 2D CAD editor that runs entirely in the browser. It speaks the language drafters already know — model space, paper layouts, snaps, grips, layers, dimensions, DXF — with zero install and no accounts. Your drawings are .linea files on your own disk; the browser just keeps an autosaved working copy so a reload never loses work.

Open the editor →

What makes it different

Blocks are parametric JavaScript. A block definition is a small script — typed parameters in, geometry out:

// surface.block.js
import { defineBlock } from "lineadraw";

export default defineBlock({
  id: "9f6f9dd3-…", // unique — a UUID is a good choice
  name: "Surface", // Visible name
  params: [
    {
      name: "type",
      type: "enum",
      default: "rock",
      options: ["rock", "ground"],
    },
  ],
  place: ["Start point", "End point"], // one point pick per label, in order
  draw: ({ params, inputs: [start, end] }) => {
    params.type; // "rock" | "ground" — inferred
    return [{ type: "line", a: start, b: end }];
  },
});

Blocks can also declare geometric inputs — points you pick at placement — so a beam spans two picked ends and a fence runs along as many points as you click. Every anchor stays a drag grip afterwards.

Real drafting, not a toy

  • Draw — lines, polylines with arc bulges, circles, arcs, ellipses, hatches, text with leaders, and chained/angular/radial dimensions with a proper dimension style.
  • Snap — endpoint, midpoint, center, quadrant, intersection, perpendicular, extension, nearest, plus ortho and polar tracking.
  • Organize — layers with color, lineweight, and line types ("by layer" inheritance with per-object overrides).
  • Lay out — multiple paper layouts with ISO sheets and first-class viewports, printed to accurate PDF from the same painting path as the canvas.
  • Exchange — DXF import and export; the geometry model is deliberately DXF-shaped, so interchange stays a direct mapping.

Under the hood

React 19, TypeScript, Vite, zustand, zod — an npm workspace where @lineadraw/editor is a self-contained editor package and the web app is a thin shell around it, so the editor can be embedded in other hosts too.


Draw something: lineadraw.com

Pinned Loading

  1. lineadraw lineadraw Public

    Public repo for Linea project

    TypeScript 4

Repositories

Showing 4 of 4 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…