Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

antfu/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', 'rectangle', '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.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 17

Languages

AltStyle によって変換されたページ (->オリジナル) /