# Rough.js

> Draws lines, shapes and SVG paths in a sketchy, hand-drawn style on canvas or SVG; the renderer behind Excalidraw.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/roughjs

free

Draws lines, shapes and SVG paths in a sketchy, hand-drawn style on canvas or SVG; the renderer behind Excalidraw.

by Preet Shihn[GitHub](https://github.com/rough-stuff/rough)[npm](https://npmjs.com/package/roughjs)

[visit](https://roughjs.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://roughjs.com](https://roughjs.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [Rough Notation](https://tastebase.ehsanulsiam.workers.dev/browse/rough-notation)

Animated hand-drawn underlines, highlights, circles, boxes and brackets on page text, drawn with Rough.js.

no preview

### [Tremor](https://tastebase.ehsanulsiam.workers.dev/browse/tremor)

React dashboard components on Recharts and Tailwind: area, bar and donut charts, KPI cards, trackers.

no preview

### [Liveline](https://tastebase.ehsanulsiam.workers.dev/browse/liveline)

A real-time animated line chart for React on one canvas, for live prices and metrics.

no preview

### [microcharts](https://tastebase.ehsanulsiam.workers.dev/browse/microcharts)

Word-sized React charts (sparkline, bar, bullet) that sit inside a sentence or table cell.

## Looks that pick it

[Hand-drawnfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/hand-drawn)[Scrapbook / stickerfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/scrapbook)

## For your agent

##### Install

`npm i roughjs`

##### Use it for

- a sketchy hand-drawn chart or diagram: d3 scales and shapes feed paths to rc.path()
- hand-drawn boxes, circles, arrows and dividers around content on a doodle or sketch-style page
- a whiteboard or diagram tool whose shapes look drawn by hand, as in Excalidraw
- hachure, cross-hatch or zigzag fills that look shaded with a pen

##### Skip it when

- underlining, highlighting or circling words in running text: use rough-notation, which positions and animates the marks
- a dashboard where values must be read precisely: sketchy marks blur them, use recharts

##### What's inside16 free

- line
- rectangle
- ellipse
- circle
- linearPath
- polygon
- arc
- curve
- path
- hachure fill
- solid fill
- zigzag fill
- cross-hatch fill
- dots fill
- dashed fill
- zigzag-line fill

##### Facts

**Frameworks**
vanilla, react, vue, svelte, solid, angular

**Styling**
unstyled

**Weight**
tiny

**Accessibility**
weak

**Maturity**
established

**License**
MIT

**Price**
Free

##### Pairs with

[Rough Notation](https://tastebase.ehsanulsiam.workers.dev/browse/rough-notation)

```
import rough from 'roughjs'

const svg = document.querySelector<SVGSVGElement>('#chart')!
const rc = rough.svg(svg, { options: { seed: 7, roughness: 1.2, stroke: 'currentColor' } })

values.forEach((v, i) =>
  svg.appendChild(rc.rectangle(12 + i * 44, 200 - v, 30, v, { fill: '#f59e0b', fillStyle: 'hachure', hachureGap: 5 })),
)
svg.appendChild(rc.line(0, 200, 12 + values.length * 44, 200))
```

https://roughjs.com

Loading website

[Visit](https://roughjs.com/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
