Skip to content
forked from antfu/drauu

Headless SVG-based drawboard in browser.

License

Notifications You must be signed in to change notification settings

miunaliang/drauu

 
 

Repository files navigation

drauu

NPM version

SVG-based drawing tool in browser. Built for Slidev.

Live Demo (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

npm i drauu
<svg id="svg"></svg>
import { createDrauu } from 'drauu'

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

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

Credits

Inspired by

Thanks!

Sponsors

License

MIT

About

Headless SVG-based drawboard in browser.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 90.2%
  • HTML 9.4%
  • CSS 0.4%