{"id":4281,"url":"https://github.com/Partido-Asia/react-native-drawpad","last_synced_at":"2025-07-31T13:30:49.061Z","repository":{"id":215160008,"uuid":"107088563","full_name":"Partido-Asia/react-native-drawpad","owner":"Partido-Asia","description":"A React Native component for user to draw anything by touching screen","archived":false,"fork":false,"pushed_at":"2018-08-31T10:19:55.000Z","size":778,"stargazers_count":30,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-15T00:20:07.893Z","etag":null,"topics":["android","ios","react-native","react-native-component","reactjs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Partido-Asia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-10-16T06:48:12.000Z","updated_at":"2023-08-15T16:15:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"5d72b163-72d2-4337-926a-520bff9ba375","html_url":"https://github.com/Partido-Asia/react-native-drawpad","commit_stats":null,"previous_names":["partido-asia/react-native-drawpad"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Partido-Asia%2Freact-native-drawpad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Partido-Asia%2Freact-native-drawpad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Partido-Asia%2Freact-native-drawpad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Partido-Asia%2Freact-native-drawpad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Partido-Asia","download_url":"https://codeload.github.com/Partido-Asia/react-native-drawpad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228248556,"owners_count":17891447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","ios","react-native","react-native-component","reactjs"],"created_at":"2024-01-05T20:17:06.765Z","updated_at":"2024-12-05T06:31:39.696Z","avatar_url":"https://github.com/Partido-Asia.png","language":"JavaScript","funding_links":[],"categories":["Components"],"sub_categories":["UI"],"readme":"# react-native-drawpad\n\n![image](https://imgur.com/1kN9OtI.gif)\n\nBasic useful feature list:\n\n * Let users draw anything they want!\n * change color of input easily\n * change thickness of input easily\n * default penal to change color, thickness and undo\n * get base64 encoding callback\n\n\n### Still developing, any PR is welcome!\n\n##How to install \n\n```\nnpm install react-native-drawpad --save\nrnpm link react-native-webview-bridge\n```\n\nAnd here's some code! :+1:\n\n```javascript\nimport ReactNativeDrawPad from 'react-native-drawpad';\n...\n\n\nrender(){\n  return (\n    \u003cReactNativeDrawPad\n        ref=\"drawpad\"\n        padWidth={300}\n        padHeight={300}\n        padColor={\"#efefef\"}\n        onPadUpdated={this.catchImageEncode}\n    /\u003e\n   )\n }\n \nchangePenColor(color){\n\tthis.refs.drawpad.changeColor(color)\n}\n\nundo(){\n  this.refs.drawpad.undo(coor)\n}\n\nchangePenColor(thickness){\n\tthis.refs.drawpad.changethickness(thickness)\n}\n\ncatchImageEncode(base64EncodingImage){\n\t//do anything with the image here\n}\n\n...\n```\n\n### Props\n\n| Prop | Description | Default |\n|---|---|---|\n|**`showColorSelectors`**|Boolean, if true, show the color selector |`true`|\n|**`showErasor`**|Boolean, if true, show the erasor button |`true`|\n|**`showUndoButton`**|Boolean, if true, show the undo button |`true`|\n|**`showThicknessSlider`**|Boolean, if true, show the thickness slider |`true`|\n|**`selectedColor`**|Sring, color for text in button when selected |`#dd7777`|\n|**`padColor`**|Sring, color of the drawpad |`#eee`|\n|**`padWidth`**|Number, width of the drawpad |`300`|\n|**`padHeight`**|Number, height of the drawpad |`300`|\n|**`initColor`**|Sring, color of the pen initially |`#dd7777`|\n|**`colors`**|Array, a set of color used in color selector |`['#dd7777','#222','#FE5722', '#FEEA3B', '#4CAE50', '#2196F2','purple']`|\n|**`onPadUpdated`**|Function, the function to listen to the change of the drawpad |`a function log the base64 encoding image data`|\n\n### Reference:\n\n * [React Native Webviw-Bridge](https://github.com/alinz/react-native-webview-bridge) for webview/native communication\n\n\n![image](https://i.imgur.com/SwqV8dc.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPartido-Asia%2Freact-native-drawpad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPartido-Asia%2Freact-native-drawpad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPartido-Asia%2Freact-native-drawpad/lists"}