Skip to Content
zjkm-ui
Components

Path Drawing

A signature or path that draws itself.

ProPro, coming soon.
Props
2.5s
<PathDrawing>
  <Signature />
</PathDrawing>

Get notified

Path Drawing is a Pro effect. Join the waitlist and we'll email you when it's available.

Usage

Wrap an SVG signature, logo or illustration. Once it scrolls into view, its strokes draw one after another, like a pen. Each stroke gets time in proportion to its length, so the pen moves at an even speed. Afterwards the SVG is exactly as it was.

import { PathDrawing } from "@zjkm/pro/path-drawing";

export function SignOff() {
  return (
    <PathDrawing duration={3}>
      <Signature />
    </PathDrawing>
  );
}

Strokes draw in document order. Filled shapes don't draw, so outline them as strokes.

Props

PropTypeDefaultDescription
childrenReactNodeYour SVG.
durationnumber2.5Seconds for the whole drawing.
selectorstring"path"CSS selector for the strokes that draw.
classNamestringClasses for the wrapper.

With reduced motion, the drawing shows complete.

On this page