Docs/Signature

Signature

An animated SVG signature effect using Opentype.js and Framer Motion to draw out text as if hand-written.

Installation

$pnpm dlx shadcn@latest add @componentry/signature

Usage

Font Requirement: To enable the hand-written effect accurately, you must download the required font file and place it in your project's public directory.

Download LastoriaBoldRegular.otf

API Reference

PropTypeDefault
textText to generate signature for.
string—
colorColor of the signature path.
string"currentColor"
fontSizeFont size of the signature.
number32
durationAnimation duration in seconds.
number1.5
delayDelay before animation starts in seconds.
number0
classNameAdditional CSS classes.
string—
inViewOnly animate when in view.
booleanfalse
onceOnly animate once.
booleantrue

Click on the icon in the top right of the example preview to view the source code for specific variants.

Keep in mind

This component is inspired by various open-source projects and patterns. Please verify licenses and implementation details before using in production.

Have any questions?
Contact on@harshjdhv
import { Signature } from "@/components/ui/signature"

<Signature text="Componentry" />