https://github.com/florianv/hand-signature
Polymer element for handwritten signatures
https://github.com/florianv/hand-signature
Last synced: 3 months ago
JSON representation
Polymer element for handwritten signatures
- Host: GitHub
- URL: https://github.com/florianv/hand-signature
- Owner: florianv
- License: mit
- Created: 2014-08-29T21:20:53.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-07-04T01:14:58.000Z (almost 8 years ago)
- Last Synced: 2025-03-01T03:26:06.362Z (4 months ago)
- Language: CSS
- Homepage: http://florianv.github.io/hand-signature
- Size: 455 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hand-signature
> Polymer element for handwritten signatures
## Installation
```bash
$ bower install hand-signature --save
```## Usage
### Import
```html
```
### Basic
```html
```
Adding a title:
```html
Please sign below
```
### Data binding
In order to get the signature image, you can bind the `data` attribute to a property of your element.
While the user is signing, the property will be updated with the image data encoded in base64.```html
Polymer('hand-signature-demo', {
signatureChanged: function (oldValue, newValue) {
// The newValue contains the image data
}
});
```
### Attributes
| Attribute | Description | Default
|-----------------|-----------------------------------|---------
| format | Image format | png
| data | Bound to the image data | undefined
| width | Width of the element | 200px
| height | Height of the canvas | 200px
| lineColor | Line color | #212121
| lineJoin | Line join | mitter
| lineWidth | Line width (in pixels) | 2
| backgroundColor | Canvas background color | white
| clearable | Allow the signature to be cleared | true## Browser Support
- Chrome 24+
- Internet Explorer 11+
- Firefox 24+
- Safari 6.1+
- Opera 16+:warning: Mobiles not supported yet
## License
[MIT](https://github.com/florianv/hand-signature/blob/master/LICENSE)