> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemtipsandtricks/widgets/global-widgets/draw-signature.md).

# Draw Signature

A user can use this widget to draw a signature (or basically anything else) on a canvas. The widget generates an image and stores it in a datafield\<file>. *All other widget properties have default values and may be left blank.*

<figure><img src="https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2FOmqUjJJujQVngv7cZhOh%2F2024-02-0113-29-31-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=ea139a97-1661-4e8e-8eff-4e2b57d89505" alt=""><figcaption></figcaption></figure>

Properties

<table><thead><tr><th width="243">Property</th><th width="159">DataType</th><th>Description</th></tr></thead><tbody><tr><td>Output</td><td>Datafield, File</td><td>Store the output image in this datafield.</td></tr><tr><td>Image extension (png/jpg)</td><td>text, Expression</td><td>Changes the output file extension. By default this value is set to "png". Allowed values are "png" and "jpg". Note that JPG does not support transparancy. JPG can be used to create smaller files compared to PNG. Use the 'Background color' property to add a custom background color.</td></tr><tr><td>Image name</td><td>text, expression</td><td>Changes the output file name. By default this value is: "image".</td></tr><tr><td>Display clear-button</td><td>boolean</td><td>Allows the user to clear the canvas by showing a clear button. By default this value is true.</td></tr></tbody></table>

Behavior

<table><thead><tr><th width="235">Property</th><th width="175">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>Maintain aspect ratio</td><td>Boolean</td><td>Maintain the aspect ratio of 'width' and 'height' when the width changes because of responsive design.</td></tr></tbody></table>

Appearance

<table><thead><tr><th width="220">Property</th><th width="178">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>Background color</td><td>Text, Expression</td><td>Changes the background color of the output image. By default this value is set to "white". This value is a CSS (hexadecimal) color code or keyword. Hexadecimal values require a leading number sign (#). RGB(A) colors are also allowed. Examples: "#366dbf", "#ff0000", "rgba(0,0,0,0.5)", "black" or "red".</td></tr><tr><td>Border color</td><td>Text, Expression</td><td>Changes the border color of the signature widget. The border is not included in the output image. This value is a CSS (hexadecimal) color code or keyword. Hexadecimal values require a leading number sign (#). RGB(A) colors are also allowed. Examples: "#366dbf", "#ff0000", "rgba(0,0,0,0.5)", "black" or "red".</td></tr><tr><td>Clear-button context</td><td>dropdown, Bootstrap context</td><td>Changes the context of the clear button using bootstrap color contexts, such as "success" and "danger".</td></tr><tr><td>Clear-button size</td><td>Dropdown</td><td>The clear button can either be: extra small, small, normal or large.</td></tr><tr><td>Clear-button text</td><td>Text, Expression</td><td>Changes the text on the clear button. By default this value is set to "Clear".</td></tr><tr><td>Clear-button full widt</td><td>Boolean</td><td>When true: this property makes sure that the clear button has the same width as the canvas. By default this value is false.</td></tr><tr><td>Height</td><td>Number, Expression</td><td>The height of the canvas in pixels. The default value is 300. The height may change on smaller screens when 'Maintain aspect ratio ' is true. Otherwise the height will remain the same on all devices.</td></tr><tr><td>Width</td><td>Number, Expression</td><td>The width of the canvas in pixels. The default value is 600. Note that the width will never be larger than the width of its container. Therefore, the canvas width may be smaller on devices with smaller screens.</td></tr><tr><td>Minimal stroke width</td><td>Number, Expression</td><td>This widget simulates 'pen presure' by changing stroke width. By default the minimal stroke width is 0.5, allowing thin lines when drawing fast.</td></tr><tr><td>Maximum stroke width</td><td>Number, Expression</td><td>Defines the maximum stroke width of the signature. By default the maximum stroke width is 2.5, 5 times thicker than the minimum stroke width.</td></tr><tr><td>Stroke color</td><td>Text, Expression</td><td>By default a user can draw a black signature. Use this property to change the pen color. This value is a CSS (hexadecimal) color code or keyword. Hexadecimal values require a leading number sign (#). RGB(A) colors are also allowed. Examples: "#366dbf", "#ff0000", "rgba(0,0,0,0.5)", "black" or "red".</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.wem.io/platform/wemtipsandtricks/widgets/global-widgets/draw-signature.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
