Skip to main content
Mantı UI logoMantı UIv0.13.0
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
labelReactNode—Optional 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[]) => void—Called when a stroke ends, with all paths.
disabledboolean—Disable drawing.
readOnlyboolean—Render the strokes without allowing new input.
namestring—Form 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