Blazorise Signature Pad API
Explore the Blazorise Signature Pad API reference for parameters, events, methods, and related types.
For examples and usage guidance, see the Signature Pad documentation.
API
Parameters
| Parameter | Default | Type |
|---|---|---|
AriaLabelledBy | — | string |
Specifies the aria-labelledby attribute value. | ||
BackgroundColor | — | string |
The color used to define the background color of the signature pad. Can be any color format; including HEX, or rgb. | ||
CanvasHeight | null | int? |
Specifies the height, in pixels, of the underline canvas element. | ||
CanvasWidth | null | int? |
Specifies the width, in pixels, of the underline canvas element. | ||
DotSize | 0 | double |
The radius of a single dot. Also the width of the start of a mark. | ||
ImageQuality | null | double? |
The encoder options for image type [png, jpeg] to get from the canvas element. Accepted range is from 0 to 1, where 1 means best quality. | ||
ImageType | Png | SignaturePadImageType |
The image type [png, jpeg, svg] to get from the canvas element. Possible values: PngJpegSvg | ||
IncludeImageBackgroundColor | false | bool |
If true, the [svg] image returned from the canvas will include background color defined by the BackgroundColor parameter. | ||
MaxLineWidth | 0 | double |
The maximum width of a line. | ||
MinDistance | 0 | int |
Add the next point only if the previous one is farther than 'n' pixels. Defaults to 5. | ||
MinLineWidth | 0 | double |
The minimum width of a line. | ||
PenColor | — | string |
The color used to define the lines color of the signature pad. Can be any color format; including HEX, or rgb. | ||
ReadOnly | false | bool |
If true, prevents the user interaction. | ||
TabIndex | null | int? |
If defined, indicates that its element can be focused and can participates in sequential keyboard navigation. | ||
Throttle | 0 | int |
The time in milliseconds to throttle drawing. Set to 0 to turn off throttling. | ||
Value | null | byte[] |
Gets or sets value for the signature pad. | ||
VelocityFilterWeight | 0 | double |
The weight used to modify new velocity based on the previous velocity. | ||
Events
| Event | Type |
|---|---|
BeginStroke | EventCallback<SignaturePadBeginStrokeEventArgs> |
Defines the event that is triggered when a new stroke begins on the signature pad. The event provides information about the starting point of the stroke. | |
EndStroke | EventCallback<SignaturePadEndStrokeEventArgs> |
Defines the event that is triggered when a stroke ends on the signature pad. The event provides the signature pad's current image data as a Data URL. | |
ValueChanged | EventCallback<byte[]> |
Defines the event that is triggered when the signature pad value changes. The event provides the new signature as a byte array. | |
Methods
| Method | Return | Parameters |
|---|---|---|
Clear | Task | — |
Clears the content of a signature canvas.
| ||
GetDataUrl | string | byte[] data, SignaturePadImageType imageType |
Gets the data url based on the image type and the data array.
| ||
Undo | Task | — |
Undos the last stroke if there is any.
| ||