Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk3 min

I Extracted My SVG Animation Engine and Open-Sourced It as @penwell/draw-on

Pratik Singh's @penwell/draw-on is a standalone MIT-licensed library for staged SVG animation, timeline progress control, React integration, and browser WebM recording.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Pratik Singh extracted the SVG animation engine he built for Penwell and released it as @penwell/draw-on, an MIT-licensed JavaScript library. Its purpose is to make diagrams appear to draw themselves: animate strokes first, then reveal fills and labels, with controls for playback and timeline progress. The library is separate from the Penwell application.

Why Singh built it

Singh wanted SVG diagrams to appear as if they were being drawn. He initially used Vivus for stroke animation, but the SVGs he was working with also contained fills, text, and other diagram elements. He wanted to control the sequence and connect animation progress to a timeline, as well as export the result as video. Those needs led him to develop the engine within Penwell and later extract it as a standalone package.

As an Amazon Associate I earn from qualifying purchases.

Singh announced the project as version 0.1.4 on September 19, 2026, according to the announcement’s search context; the page itself displays “Sep 19” without a year. The npm listing showed version 0.1.5 when accessed for this article, so package metadata may have changed since the announcement. Read Singh’s announcement on DEV.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What @penwell/draw-on does

The documented animation sequence draws SVG strokes, then reveals fills and labels. The package also lets a caller set progress directly, rather than relying only on automatic playback. That makes it possible to scrub through the animation or coordinate it with another timeline.

The package offers a framework-agnostic JavaScript/TypeScript core as well as React integration. Its README documents utilities including createDrawing, parseSvg, computeDims, setProgress, and recordDrawToWebM. The package can be installed with:

npm install @penwell/draw-on

Its README also describes workflows involving SVGs from Mermaid, Excalidraw, tldraw, and Figma, along with handwriting. Those are documented use cases, not independent compatibility tests; results may depend on the structure and styling of a particular SVG. See the package README and installation details on npm.

How it differs from the initial Vivus approach

Singh describes Vivus as his starting point for animating strokes. The distinction he draws is about the additional needs he encountered, not a benchmark of either library.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Need Initial Vivus use, as described by Singh @penwell/draw-on documentation
SVG elements Stroke animation Strokes, followed by fills and labels
Timeline control Not described in the announcement as meeting his needs Playback and direct progress control for scrubbing or synchronization
Video export Not described as part of the initial approach Browser recording to WebM
Framework options Not compared in the announcement Framework-agnostic core and React hook/component

What to know before recording or integrating an SVG

Recording depends on browser support

WebM recording relies on the browser’s MediaRecorder and canvas.captureStream() APIs. The README describes Chromium-based browsers as the most reliable option in practice and recommends checking canRecordVideo() before offering recording. The package does not provide MP4 export because MediaRecorder support for MP4 is inconsistent across browsers.

External styles and fonts can affect the video

When an SVG is rasterized for recording, references to external stylesheets or fonts may not render correctly. The package documentation recommends inlining these resources where possible.

The drawing process changes the SVG

The core mutates the SVG in place. The documentation attributes this to Vivus rewriting shapes into paths. If the original SVG must remain untouched, pass a clone to the drawing code.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Who should consider trying it

@penwell/draw-on is relevant if a project needs a diagram to unfold in stages, a progress value that can be synchronized with a custom timeline, or browser-based WebM recording. React developers can use the supplied React helpers; projects using other frameworks can use the core directly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

It is an early-stage open-source release, not a claim of broad production readiness. Singh says edge cases remain and invites users to try SVGs he has not encountered. Treat the README’s listed sources as intended workflows, and test the specific SVGs, fonts, styles, and target browsers your project depends on.

Best Value
Sale
SVG Programming: The Graphical Web
  • Used Book in Good Condition

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.