Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsApr 7, 2026·2 min de lecture

tldraw — Infinite Canvas SDK for AI Applications

Open-source infinite canvas library for building whiteboard, diagramming, and design applications. React component with real-time collaboration. Used by AI tools for visual generation. 40,000+ stars.

Introduction

tldraw is an open-source infinite canvas library for building whiteboard, diagramming, and design applications with 40,000+ GitHub stars. Drop a React component into your app and get a full-featured drawing canvas with shapes, text, images, collaboration, and export. AI companies use tldraw for visual generation — draw a wireframe and have AI turn it into code, or generate diagrams from text descriptions. Best for developers building collaborative or visual AI applications. Works with: React, Next.js. Setup time: under 1 minute.


Key Features

Full Canvas in One Component

<Tldraw />

Includes: freehand drawing, shapes, text, images, arrows, frames, sticky notes, embed, and more.

AI Integration Patterns

Draw-to-Code:

1. User draws a wireframe on tldraw canvas
2. Export as SVG/PNG
3. Send to Claude/GPT-4 Vision
4. AI generates React code from the drawing

Text-to-Diagram:

1. User describes: "API gateway connecting to 3 microservices"
2. AI generates tldraw JSON
3. Diagram appears on canvas

SDK for Custom Apps

import { createTLStore, defaultShapeUtils } from "tldraw";

const store = createTLStore({ shapeUtils: defaultShapeUtils });

// Programmatically add shapes
store.createShapes([
  {
    type: "geo",
    x: 100, y: 100,
    props: { geo: "rectangle", w: 200, h: 100, text: "API Gateway" },
  },
]);

Real-Time Collaboration

import { Tldraw, useSync } from "tldraw";

function CollabCanvas() {
  const store = useSync({ uri: "wss://your-server.com/room/123" });
  return <Tldraw store={store} />;
}

Export Options

  • SVG (vector, scalable)
  • PNG (raster, screenshots)
  • JSON (tldraw format, re-editable)
  • Clipboard (paste into other tools)

Used By

  • Vercel (internal tools)
  • Cal.com (scheduling diagrams)
  • AI wireframe tools
  • Notion-like apps with drawing features

Key Stats

  • 40,000+ GitHub stars
  • React component library
  • Real-time collaboration
  • AI draw-to-code pattern
  • SVG/PNG/JSON export

FAQ

Q: What is tldraw? A: An open-source infinite canvas React library for building whiteboard and diagramming applications, used by AI tools for visual generation.

Q: Is tldraw free? A: Yes, open-source under Apache 2.0 for the SDK. tldraw.com (hosted) has free and paid tiers.

Q: Can AI generate tldraw content? A: Yes, AI can generate tldraw JSON shapes programmatically, and tldraw canvas exports can be sent to vision models for analysis.


🙏

Source et remerciements

Created by tldraw. Licensed under Apache 2.0.

tldraw — stars 40,000+

Thanks for making the infinite canvas a React component.

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires