
Raphaël
A JavaScript library for drawing vector graphics in web browsers.DmitryBaranovskiy/raphael
- Stars
- 11.3k
- Forks
- 1.6k
- Licence
- MIT
- Language
- JavaScript
- Last update
- 2.8 years ago
- Type
- Library
No commits in over a year — check for forks or alternatives before adopting.
What it is
Raphaël is a JavaScript library that lets web pages draw shapes, lines, and other vector graphics, such as charts or diagrams, using code. It aims to work consistently across different web browsers. It is loaded into a page as a script, and its README describes it as a UMD-compliant file set.
- Draw shapes and paths on a web page with JavaScript
- Build interactive vector graphics inside a browser page
- Load the library via a script tag or AMD module loader
Great for
- Developers adding custom drawings or simple charts to a website
- Front-end developers who want browser-based vector graphics without a plugin
- Maintainers of existing projects that already use Raphaël
Not ideal for
- People who need a ready-made chart product with no coding, since this is a code library
- Projects needing new features or fast fixes, because the README says PR acceptance can take a while
- Anyone needing automated tests, since the README says testing is manual right now
How to get it
- 1
Clone and build from source
You'll need: NPM · Yarn
Clone the repository
git clone https://github.com/DmitryBaranovskiy/raphael.gitInstall dependencies
yarn install --frozen-lockfileBuild all distributable files
yarn build-all - 2
Run it
- Build the library using the commands above
- Load raphael.min.js (or another distributable) in an HTML page with a script tag
- Or load it through AMD with define(["path/to/raphael"], ...)
- Try the examples linked from the Raphael-boilerplate project
- 3
Get the most out of it
- Use the no-deps build if eve is already loaded on your page
- Check the Raphael-boilerplate repository for loading examples
- Use dev/raphaelTest.html with a local server to experiment, after running npm run start
- Read the library website linked in the README for the API
Downloads
Strengths
- MIT licensed, so it can be used in commercial and personal projects
- Ships as several UMD builds, with or without its eve dependency
- Has a long history and a community of related projects listed in the README
Trade-offs
- The README says the project is aimed at cross-browser support, but the last push shown is from January 2024 and the latest release is v2.3.0, so activity may be slow
- Testing is manual, with no automated test process described
- Depends on the eve library unless you use the no-deps build
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| raphael (this) | 11.3k | Library | intermediate | 2.8 years ago | Developers adding custom drawings or simple charts to a website |
| fabric.js | 31.5k | Library | intermediate | 4 days ago | Web developers building interactive canvas editors or drawing tools |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.