All demos

digital-signature-field · HTML

Plain HTML and a JavaScript module: no framework, no bundler.

Default

The default layout, actions bar below the drawing area, in a native <form> with required. Submit reads the value with FormData.

Raw value null

Headless with the page's own toolbar

actions="none" hides the built-in bar. The buttons below call undo(), redo() and clear(), and dsf-history-change enables them.

Raw value null

Custom styles

Custom properties and ::part() in the page's stylesheet (.fancy-signature), plus an extra sheet through the styles property.

Raw value null

Preview + dialog

The form shows the value as an <img>. The dialog edits a copy: Save copies it into the form, Cancel discards it.

Raw value null

Sign here

Actions bar above, with pen options

actions="color width undo redo clear", actions-position="top", penColors and pressure.

Raw value null

Side rail, right to left

actions-position="end" with dir="rtl": the rail moves to the left. Labels are translated through labels.

Raw value null