Description
svg2roughjs is a JavaScript library that converts an SVG image into a sketchy, hand-drawn looking version using Rough.js. You create an instance of its Svg2Roughjs class and give it an output container. Calling sketch() draws the current SVG into that container as a hand-drawn sketch. The target can be an HTML div, which gives SVG or canvas output, or an existing SVG or canvas element. The OutputType enum chooses between SVG and canvas when you target a container, and the constructor accepts an optional Rough.js configuration. If the source SVG changes, the sketch method can re-read it, so one instance can be reused. The library ships as an ES module and as a UMD bundle for script tags or loaders such as RequireJS, and the UMD build can also be loaded from unpkg. The README documents the module exports, the constructor and methods, and a properties table. A sample application is included in the repository. Install it from the npm registry. The project is public on GitHub, and the README links a live sample app to try.…
Highlights
- Converts SVG into hand-drawn sketches
- SVG or canvas output
- Built on Rough.js options
- ES module and UMD bundle
- Sample application included
Ratings & Reviews
No ratings yet
Be the first to rate Svg2roughjs.
People also visit

react-sketch-canvas
Freehand vector drawing component for React using SVG as canvas
Svg2roughjs FAQ
What does svg2roughjs do?
It takes an SVG image and draws it again as a hand-drawn, sketchy version using Rough.js.
How do I use it?
Create a Svg2Roughjs instance with a target container, then call sketch() to draw the SVG there.
Can it output canvas?
Yes. The OutputType option switches between SVG and canvas output when the target is a container.
How do I install it?
Install it from the npm registry, or load the UMD bundle from unpkg with a script tag.
Is it free?
The code is open source and public on GitHub.
What are the best Svg2roughjs alternatives?
Popular alternatives to Svg2roughjs include SVG Drawing, BoxySVG and Drawsvg. See all Svg2roughjs alternatives








