gitwtfhub

wtf is vivus?

maxwellito/vivus — explained in plain English

Analysis updated 2026-06-24

15,477JavaScriptAudience · developerComplexity · 2/5Setup · easy

TL;DR

A tiny zero-dependency JavaScript library that animates SVG images to look like they are being drawn by hand, tracing each stroke one at a time with built-in styles like delayed, sync, or one-by-one.

Mindmap

mindmap
  root((vivus))
    What it does
      SVG draw animation
      Stroke-by-stroke reveal
      No dependencies
    Animation styles
      Delayed start
      Sync all paths
      OneByOne drawing
    How it works
      strokeDashoffset CSS
      JavaScript loop
      Pathformer converter
    Use cases
      Landing page logos
      Portfolio intros
      Icon animations
    Audience
      Frontend developers
      Web designers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Add a hand-drawn drawing animation to a logo or icon on a website landing page.

REASON 2

Create an animated SVG illustration that traces itself stroke by stroke for a portfolio or intro sequence.

REASON 3

Export a CSS-only animated SVG using the companion Vivus Instant tool without writing any JavaScript.

What's in the stack?

JavaScriptCSSSVG

How it stacks up

maxwellito/vivusavwo/whistlejsdoc/jsdoc
Stars15,47715,51015,438
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Wtf does this do

Vivus is a small JavaScript library that makes an SVG image appear as if it is being drawn by an invisible pen. An SVG is an image file built from mathematical descriptions of lines and shapes rather than pixels, which is what makes the trick possible, Vivus can trace those lines one stroke at a time and reveal the picture as the strokes are drawn. The library has no dependencies, so you only need to include the script in your page. There are several built-in animation styles. The default, "delayed", starts every line at almost the same moment but with a small offset. "Sync" starts and finishes every line at the same time. "OneByOne" draws each line in turn, with a length-based duration so the pen moves at a constant speed and the effect looks closest to live handwriting. Under the hood Vivus relies on a CSS property called strokeDashoffset that controls how much of a path's outline is visible, a JavaScript loop changes that value over time to produce the drawing effect. Because strokeDashoffset only works on path elements, the library ships with a class called "pathformer" that converts other SVG shapes, circles, rectangles, lines, polylines, into paths so they can be animated. Your SVG paths need a stroke and no fill, and hidden paths or text elements should be removed first. You would use Vivus to add a hand-drawn flourish to a logo, illustration, icon, or any decorative SVG on a website, common touches for landing pages and intros. It can be installed via npm, Bower, or popular CDNs, and a companion tool called Vivus Instant lets you export a CSS-only animated SVG without writing JavaScript. The full README is longer than what was provided.

Yoink these prompts

Prompt 1
I have an SVG logo I want to animate as if it's being drawn. Write the JavaScript to set up Vivus on it with the OneByOne style and a speed of 200.
Prompt 2
My SVG has circle and rect elements that aren't animating with Vivus. Show me how to use the Pathformer class to convert them to paths before animating.
Prompt 3
Write a Vivus setup that animates an SVG with the delayed style and calls a callback function when the drawing finishes.
Prompt 4
I want to animate an SVG only after the user scrolls it into view. Show me how to trigger Vivus programmatically on a scroll event.

Frequently asked questions

wtf is vivus?

A tiny zero-dependency JavaScript library that animates SVG images to look like they are being drawn by hand, tracing each stroke one at a time with built-in styles like delayed, sync, or one-by-one.

What language is vivus written in?

Mainly JavaScript. The stack also includes JavaScript, CSS, SVG.

How hard is vivus to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is vivus for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.