Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/antfu/drauu

Headless SVG-based drawboard in browser.
https://github.com/antfu/drauu

drawboard

Last synced: 19 days ago
JSON representation

Headless SVG-based drawboard in browser.

Awesome Lists containing this project

README

        

# drauu

[![NPM version](https://img.shields.io/npm/v/drauu?color=a1b858&label=)](https://www.npmjs.com/package/drauu)

SVG-based drawing tool in browser. Built for [Slidev](https://github.com/slidevjs/slidev).

[Live Demo](http://drauu.netlify.app/) (built with Vanilla JavaScript!)

## Features

- Vanilla JavaScript - integrate into any framework you like
- SVG-based - scalable, transparent, and serializable
- Stylus / Touch pressure support
- Headless (unstyled) - style it as you want
- Undo / Redo stacks

## Install

```bash
npm i drauu
```

```html

```

```js
import { createDrauu } from 'drauu'

const drauu = createDrauu({
el: '#svg',
brush: {
mode: 'stylus', // 'line', 'rectangle', 'ellipse'
color: 'skyblue',
size: 5,
}
})

// change brush color
drauu.options.brush.color = 'red'
```

## Credits

Inspired by

- [scribby](https://github.com/naknomum/scribby) by [naknomum](https://github.com/naknomum)
- [excalidraw](https://github.com/excalidraw/excalidraw)
- [draw](https://github.com/amoshydra/draw) by [amoshydra](https://github.com/amoshydra)
- [live-draw](https://github.com/antfu/live-draw) by [antfu](https://github.com/antfu)

Thanks!

## Sponsors





## License

MIT