Components
Path Drawing
A signature or path that draws itself.
ProPro, coming soon.
<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
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Your SVG. | |
duration | number | 2.5 | Seconds for the whole drawing. |
selector | string | "path" | CSS selector for the strokes that draw. |
className | string | Classes for the wrapper. |
With reduced motion, the drawing shows complete.