Skip to main content
Mantı UI logoMantı UIv0.12.1
Studio

SignaturePad

The machine records drawn paths. Use controlled or uncontrolled paths; the clear button resets the surface.

import { SignaturePad } from '@manti-ui/react';

export default function SignaturePadBasic() {
  return (
    <div className="w-full max-w-[calc(var(--manti-space-16)*6)]">
      <SignaturePad label="Sign here" variant="primary" />
    </div>
  );
}

API

PropTypeDefaultDescription
labelReactNodeOptional label rendered above the drawing surface.
clearLabelReactNode'Clear'Label for the clear button.
variantMantiVariant'primary'Accent variant of the surface and stroke.
pathsstring[]Controlled stroke paths.
defaultPathsstring[]Initial stroke paths for uncontrolled usage.
onDrawEnd(paths: string[]) => voidCalled when a stroke ends, with all paths.
disabledbooleanDisable drawing.
readOnlybooleanRender the strokes without allowing new input.
namestringForm field name for the encoded signature.

Styling

Anatomy

PartSelectorDescription
root[data-scope="signature-pad"][data-part="root"]The component container.
label[data-scope="signature-pad"][data-part="label"]The optional label.
control[data-scope="signature-pad"][data-part="control"]The drawing frame.
segment[data-scope="signature-pad"][data-part="segment"]The SVG canvas holding the strokes.
segment-path[data-scope="signature-pad"][data-part="segment-path"]A single drawn stroke path.
guide[data-scope="signature-pad"][data-part="guide"]The dashed sign-here baseline.
clear-trigger[data-scope="signature-pad"][data-part="clear-trigger"]The clear button.

Tokens

TokenControls
--manti-signature-pad-heightheight

Last updated

Built end-to-end with Manti UI components and design tokens. Manti UI is a framework-agnostic design system on Zag.js.

GitHub