Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/antfu/drauu
- Owner: antfu
- License: mit
- Created: 2021-08-05T17:03:34.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-19T09:36:41.000Z (3 months ago)
- Last Synced: 2024-10-04T22:16:10.304Z (30 days ago)
- Topics: drawboard
- Language: TypeScript
- Homepage: https://drauu.netlify.app/
- Size: 320 KB
- Stars: 1,178
- Watchers: 5
- Forks: 63
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome - antfu/drauu - Headless SVG-based drawboard in browser. (TypeScript)
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