{"repo":"michaeldzjap/react-signature-pad-wrapper","free":true,"listed":false,"github":"https://github.com/michaeldzjap/react-signature-pad-wrapper","clone":"git clone https://github.com/michaeldzjap/react-signature-pad-wrapper.git","description":"A React wrapper for signature pad","language":"TypeScript","stars":232,"topics":["react","javascript","signature-pad","typescript"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"react-signature-pad-wrapper A React wrapper for signature pad. Installation This package is available through npm: Usage This package implements exactly the same interface as the original signature pad package and adds a couple of extra features that make responsive behaviour a little easier to deal with. For a complete overview of the available options and callables see the documentation for signature pad. Import the component like (ES6): Options may be passed as a component property during initialization: or they can be set during runtime: then from somewhere else in the code (assuming the ref is defined): Responsiveness The HTML canvas object sucks when it comes to responsiveness. The approach taken with this plugin is to use a fixed size canvas when a height and width (in pixels) is explicitly passed in as a component property: If you want the component to be responsive, simply ommit the width and height property: The canvas width and height will now be updated whenever the window is resized (using a debounced handler). Changing the width and height properties of a HTML canvas object will erase its current content. If you'd like to keep what is currently drawn on the canvas you can pass a redrawOnResize property to the component and set it to true ( redrawOnResize is false by default): This will save the current canvas content to a base64 data string before performing the resize operation and load it in the canvas right after the resize operation finishes. Note : the repe","default_branch":null,"files":null,"tree":[],"storefront":"/r/michaeldzjap","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/michaeldzjap/react-signature-pad-wrapper/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}