Optional settings that may be passed to JSignature.

Hierarchy

  • Settings

Index

Properties

background-color

background-color: string

Background color of the signature field. Defaults to #fff.

This is specified as a CSS color, ie. #fff, red, or rgb(128,0, 255).

color

color: string

Color of the signature (stroke) itself. Defaults to #000.

This is specified as a CSS color, ie. #fff, red, or rgb(128,0, 255).

data

data: object[]

Optional initial stroke data that is drawn. Each stroke is an object with the properties x and y, which both need contain the same number of x and y coordinates.

decor-color

decor-color: string

Color of decor elements such as the decor line. Defaults to #eee.

This is specified as a CSS color, ie. #fff, red, or rgb(128,0, 255).

height

height: "ratio" | number

How high the signature area should be. Defaults to ratio.

Can be either ratio, in which case the given aspect ratio is preserved; or a height (in pixels).

lineWidth

lineWidth: number

The line width of the signature (stroke). Defaults to 0 (auto).

minFatFingerCompensation

minFatFingerCompensation: number

Optional compensation when drawing the signature with a finger (instead of with a stylus). Defaults to -10.

showUndoButton

showUndoButton: boolean

Whether an undo button is displayed for undoing the last stroke.

sizeRatio

sizeRatio: number

The aspect ratio of the signature area (width divided by height). Defaults to 4. Only used when the option height is set to ratio.

width

width: "ratio" | number

How wide the signature area should be. Defaults to ratio.

Can be either ratio, in which case it fills the entire available width and the height adapts according to given aspect ratio; or a width (in pixels).