Skip to main content

Customisation

The customization option of the constructor sets the appearance of the toolbar buttons and of the signature stroke:

new MobbSign({
...options,
customization: {
signButton: {color: '#361CC9'},
confirmButton: {theme: 'success'},
discardButton: {theme: 'danger'},
doneButton: {color: '#4B0082'},
stroke: {width: 2, color: '#1E1E99'},
},
});

Buttons​

KeyButton
signButtonSign.
confirmButtonConfirm the signature.
discardButtonDiscard the signature.
doneButtonFinish.

Each button accepts a theme or a color. If you set both, theme is used.

Themes​

ThemeColour
primaryBlue
successGreen
warningYellow
dangerRed
infoLight blue
lightLight
darkDark

Custom colour​

color sets the colour of the icon and the label of the button, in hexadecimal format. The background of the button when it is hovered or pressed is calculated from that colour, by lightening it.

Signature stroke​

Since version 2.1.1, stroke sets the stroke of the signature:

KeyDefaultDescription
width1Width of the stroke.
color#1E1E99Colour of the stroke, in hexadecimal format.

Languages​

The interface is available in English and Spanish. Select the language with the language option, using its ISO 639-1 code:

new MobbSign({...options, language: 'es'});

To add a language, create the file translation-{lang}.json in your locales/ folder, where {lang} is the ISO 639-1 code of the language. Use translation-en.json as a template:

locales/translation-fr.json
{
"mobbsign": {
"sign-tooltip": "Signer le document",
"annotate-tooltip": "Ajouter une annotation",
"discard-signature-tooltip": "Rejeter la signature",
"confirm-signature-tooltip": "Confirmer la signature",
"done-tooltip": "Terminer"
}
}