explaingit

excalidraw/rough

Analysis updated 2026-07-25 · repo last pushed 2023-04-09

13HTMLAudience · developerComplexity · 2/5DormantLicenseSetup · easy

TLDR

A tiny JavaScript graphics library that renders shapes, rectangles, circles, lines, and more, with a sketchy, hand-drawn look instead of clean, precise lines. It works with both Canvas and SVG output in the browser.

Mindmap

mindmap
  root((repo))
    What it does
      Hand-drawn graphics
      Canvas and SVG support
      Shapes and paths
    Tech stack
      JavaScript
      Canvas API
      SVG
    Use cases
      Wireframing tools
      Whiteboard apps
      Diagramming tools
    Customization
      Roughness setting
      Fill styles
      Bowing and hatching
    Audience
      Vibe coders
      Product designers
      Educators

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a whiteboard or brainstorming app where shapes look hand-drawn instead of rigid.

USE CASE 2

Add informal, sketch-style diagrams to an educational website to feel more approachable.

USE CASE 3

Create a wireframing tool where UI mockups look like quick paper doodles.

USE CASE 4

Sketch architecture or user-flow diagrams with a casual, collaborative aesthetic.

What is it built with?

JavaScriptCanvas APISVGHTML

How does it compare?

excalidraw/roughasker323/baksan-evakuator-landingcarolinacherry/cardia-survey
Stars131313
LanguageHTMLHTMLHTML
Last pushed2023-04-09
MaintenanceDormant
Setup difficultyeasyeasyeasy
Complexity2/51/52/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Just include the library via npm or a script tag, no external dependencies or infrastructure required.

Free to use for any purpose, including commercial projects, as long as you keep the copyright notice.

In plain English

Rough.js is a lightweight graphics library that lets you draw shapes with a sketchy, hand-drawn appearance on the web. Instead of rendering perfectly clean lines and geometrically flawless circles, it adds a wobbly, organic quality to everything, making it look like someone quickly doodled it on paper. You can draw rectangles, circles, ellipses, lines, arcs, polygons, and even complex SVG paths, all with that casual sketched aesthetic. The library works with both Canvas and SVG, which are the two main ways browsers render graphics. At a high level, you tell it what shape to draw and where, and it applies algorithms that introduce controlled imperfections, slight deviations, wavy edges, and overlapping strokes. You can fine-tune the effect: a "roughness" setting controls how messy the lines look, a "bowing" setting warps the shape, and fill styles range from cross-hatching and zigzag patterns to solid colors. You can also adjust things like the angle and spacing of hatch lines. Anyone building a web app where a polished, corporate look would feel too stiff could benefit from this. Imagine a wireframing tool like Excalidraw (which is listed as a sponsor), a brainstorming app, a whiteboard product, or an educational site that wants diagrams to feel approachable and informal. A product team sketching architecture diagrams or user flows could use it to give their visuals a collaborative, whiteboard-like quality rather than a rigid, diagrammed feel. Diagramming tools like diagrams.net and Terrastruct also back the project. The library is notably tiny, under 9 kilobytes, so it adds almost no weight to a web application. Some of its core drawing algorithms were adapted from an earlier project called "handy" built for Processing, and the SVG arc conversion logic came from Mozilla's codebase. It's open source under the MIT license, so it's free to use in commercial projects.

Copy-paste prompts

Prompt 1
I want to add hand-drawn style shapes to my web app using Rough.js. Show me how to draw a rectangle and a circle on an HTML canvas with a sketchy look, including how to set the roughness and fill style.
Prompt 2
Using Rough.js in SVG mode, create a simple diagram with three connected boxes and arrows between them. Make the shapes look hand-drawn with cross-hatch fills and medium roughness.
Prompt 3
Help me integrate Rough.js into my existing web project. I need to draw complex SVG paths with a doodled appearance. Show me how to pass a path string and customize the bowing and stroke width.
Prompt 4
I am building a whiteboard-style web app. Generate example code using Rough.js to draw a wobbly ellipse, a line, and a polygon, each with different roughness levels so I can compare the effect.

Frequently asked questions

What is rough?

A tiny JavaScript graphics library that renders shapes, rectangles, circles, lines, and more, with a sketchy, hand-drawn look instead of clean, precise lines. It works with both Canvas and SVG output in the browser.

What language is rough written in?

Mainly HTML. The stack also includes JavaScript, Canvas API, SVG.

Is rough actively maintained?

Dormant — no commits in 2+ years (last push 2023-04-09).

What license does rough use?

Free to use for any purpose, including commercial projects, as long as you keep the copyright notice.

How hard is rough to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is rough for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.