Introduction
Vivus is a lightweight JavaScript class (with no dependencies) that allows you to animate SVGs, giving them the appearance of being drawn. There are a variety of different animations available, as well as the option to create a custom script to draw your SVG in whatever way you like.
## Animation types
- **Delayed**: Every path element is drawn at the same time with a small delay at the start. This is currently the default animation.
- **Sync**: Each line is drawn synchronously. They all start and finish at the same time, hence the name `sync`.
- **OneByOne**: Each path element is drawn one after the other. This animation gives the best impression of live drawing.
## Timing function
To give more freedom, it's possible to override the animation of each path and/or the entire SVG. It works a bit like the CSS animation timing function. But instead of using a cubic-bezier function, it use a simple JavaScript function. It must accept a number as parameter (between 0 to 1), then return a number (also between 0 and 1). It's a hook.
## Scenarize
This feature allows you to script the animation of your SVG. To do this, the custom values will be set directly in the DOM of the SVG.
Play with it on Vivus instant. More information and documentation on GitHub.
SVG animationJavaScript classNo dependenciesPath drawingTiming functionCustom scriptsAnimation types
Screenshots

Deployment
npm
适用于在现代前端工程中通过包管理器安装 vivus 并由构建工具打包使用。
Bower
适用于仍在维护的旧式前端项目中通过 Bower 管理浏览器端依赖。
直接引入 dist 脚本
适用于无需构建流程的静态页面,下载官方 dist 文件后用 script 标签直接加载。
CDN 引入
适用于快速试用或轻量页面,通过官方文档示例中的 CDN 地址直接加载 vivus.min.js。
Details
Type Open-source software
License MIT
Last verified 2026-07-18
Ad slot 300 × 250 Ad
About the data
Stars / commit times sync automatically from the GitHub API; pricing and features are human-verified.