{"id":4203,"url":"https://github.com/talut/react-native-pin-view","last_synced_at":"2025-08-04T00:32:35.003Z","repository":{"id":32699790,"uuid":"138506496","full_name":"talut/react-native-pin-view","owner":"talut","description":"Easy, convenient, quick-forming PinView component.","archived":true,"fork":false,"pushed_at":"2023-08-02T11:48:48.000Z","size":6245,"stargazers_count":173,"open_issues_count":4,"forks_count":63,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-07T07:34:38.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/talut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":null,"patreon":"talut","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-06-24T18:38:36.000Z","updated_at":"2024-09-09T15:55:20.000Z","dependencies_parsed_at":"2024-01-08T01:02:21.865Z","dependency_job_id":"17af9517-5e14-4890-bcd5-febfe2c825df","html_url":"https://github.com/talut/react-native-pin-view","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/talut/react-native-pin-view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talut%2Freact-native-pin-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talut%2Freact-native-pin-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talut%2Freact-native-pin-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talut%2Freact-native-pin-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/talut","download_url":"https://codeload.github.com/talut/react-native-pin-view/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/talut%2Freact-native-pin-view/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268634064,"owners_count":24281896,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-01-05T20:17:04.379Z","updated_at":"2025-08-04T00:32:34.286Z","avatar_url":"https://github.com/talut.png","language":"JavaScript","funding_links":["https://patreon.com/talut"],"categories":["Components","Others"],"sub_categories":["UI"],"readme":"# React Native Pin View\n\nEasy, convenient, quick-forming PinView component. It runs smoothly for both IOS and Android, and has only keyboard and input.\n\n## v3.0.3\n\n\u003cp align='center'\u003e\n\u003cimg src='./pin-view.gif' alt='PinView 1'\u003e\n\u003c/p\u003e\n\nYou can get codes of this preview from [here](#example)\n\n\n## Getting Started\n\n**via Yarn**\n\n```\nyarn add react-native-pin-view\n```\n\n**via NPM**\n\n```\nnpm install --save react-native-pin-view\n```\n\n## Basic Usage\n\n```\nimport PinView from 'react-native-pin-view';\n\n...\n        \u003cPinView pinLength={6} /\u003e\n```\n\n## Props\n\n| Prop                          | Type              | Default                                                                                                |  Required  |\n| ----------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------ | ---------- |\n|pinLength                      |number             |-                                                                                                       | **Yes**    |\n|onButtonPress                  |func               |-                                                                                                       | No         |\n|onValueChange                  |func               |-                                                                                                       | No         |\n|inputSize                      |number             |-                                                                                                       | No         |\n|activeOpacity                  |number             |`0.9`                                                                                                   | No         |\n|buttonSize                     |number             |`60`                                                                                                    | No         |\n|style                          |ViewStyle          |-                                                                                                       | No         |\n|inputAreaStyle                 |ViewStyle          |`{ marginVertical: 12 }`                                                                                | No         |\n|inputViewStyle                 |ViewStyle          |-                                                                                                       | No         |\n|inputViewEmptyStyle            |ViewStyle          |-                                                                                                       | No         |\n|buttonViewStyle                |ViewStyle          |-                                                                                                       | No         |\n|buttonAreaStyle                |ViewStyle          |`{ marginVertical: 12 }`                                                                                | No         |\n|inputViewFilledStyle           |ViewStyle          |-                                                                                                       | No         |\n|inputTextStyle                 |TextStyle          |-                                                                                                       | No         |\n|buttonTextStyle                |TextStyle          |`{ color: \"#FFF\", fontSize: 30 }`                                                                       | No         |\n|disabled                       |boolean            |-                                                                                                       | No         |\n|showInputText                  |boolean            |`false`                                                                                                 | No         |\n|accessible                     |boolean            |`false`                                                                                                 | No         |\n|buttonTextByKey                |object             |`{one: \"1\",two: \"2\",three: \"3\",four: \"4\",five: \"5\",six: \"6\",seven: \"7\",eight: \"8\",nine: \"9\",zero: \"0\",}`| No         |\n|customLeftButtonDisabled       |boolean            |`false`                                                                                                 | No         |\n|customLeftButton               |React.Component    |-                                                                                                       | No         |\n|customLeftAccessibilityLabel   |string             |`left`                                                                                                  | No         |\n|customLeftButtonViewStyle      |ViewStyle          |-                                                                                                       | No         |\n|customRightButtonDisabled      |boolean            |-                                                                                                       | No         |\n|customRightButton              |React.Component    |-                                                                                                       | No         |\n|customRightAccessibilityLabel  |string             |`right`                                                                                                 | No         |\n|customRightButtonViewStyle     |ViewStyle          |-                                                                                                       | No         |\n\n## Ref Actions\n`const pinView = useRef(null)`\n\n| Prop                          | Description                                          |\n| ----------------------------- | -----------------------------------------------------|\n|pinView.current.clearAll()     |This method completely clears the entered code.       |\n|pinView.current.clear()        |This method only delete last number of entered code.  |\n\n#### Example\n\n```javascript\nimport Icon from \"react-native-vector-icons/Ionicons\"\nimport React, { useEffect, useRef, useState } from \"react\"\nimport { ImageBackground, SafeAreaView, StatusBar, Text } from \"react-native\"\nimport ReactNativePinView from \"react-native-pin-view\"\nconst App = () =\u003e {\n  const pinView = useRef(null)\n  const [showRemoveButton, setShowRemoveButton] = useState(false)\n  const [enteredPin, setEnteredPin] = useState(\"\")\n  const [showCompletedButton, setShowCompletedButton] = useState(false)\n  useEffect(() =\u003e {\n    if (enteredPin.length \u003e 0) {\n      setShowRemoveButton(true)\n    } else {\n      setShowRemoveButton(false)\n    }\n    if (enteredPin.length === 8) {\n      setShowCompletedButton(true)\n    } else {\n      setShowCompletedButton(false)\n    }\n  }, [enteredPin])\n  return (\n    \u003c\u003e\n      \u003cStatusBar barStyle=\"light-content\" /\u003e\n        \u003cSafeAreaView\n          style={{ flex: 1, backgroundColor: \"rgba(0,0,0,0.5)\", justifyContent: \"center\", alignItems: \"center\" }}\u003e\n          \u003cText\n            style={{\n              paddingTop: 24,\n              paddingBottom: 48,\n              color: \"rgba(255,255,255,0.7)\",\n              fontSize: 48,\n            }}\u003e\n            LUNA/CITY\n          \u003c/Text\u003e\n          \u003cReactNativePinView\n            inputSize={32}\n            ref={pinView}\n            pinLength={8}\n            buttonSize={60}\n            onValueChange={value =\u003e setEnteredPin(value)}\n            buttonAreaStyle={{\n              marginTop: 24,\n            }}\n            inputAreaStyle={{\n              marginBottom: 24,\n            }}\n            inputViewEmptyStyle={{\n              backgroundColor: \"transparent\",\n              borderWidth: 1,\n              borderColor: \"#FFF\",\n            }}\n            inputViewFilledStyle={{\n              backgroundColor: \"#FFF\",\n            }}\n            buttonViewStyle={{\n              borderWidth: 1,\n              borderColor: \"#FFF\",\n            }}\n            buttonTextStyle={{\n              color: \"#FFF\",\n            }}\n            onButtonPress={key =\u003e {\n              if (key === \"custom_left\") {\n                pinView.current.clear()\n              }\n              if (key === \"custom_right\") {\n                alert(\"Entered Pin: \" + enteredPin)\n              }\n              if (key === \"three\") {\n                alert(\"You just click to 3\")\n              }\n            }}\n            customLeftButton={showRemoveButton ? \u003cIcon name={\"ios-backspace\"} size={36} color={\"#FFF\"} /\u003e : undefined}\n            customRightButton={showCompletedButton ? \u003cIcon name={\"ios-unlock\"} size={36} color={\"#FFF\"} /\u003e : undefined}\n          /\u003e\n        \u003c/SafeAreaView\u003e\n    \u003c/\u003e\n  )\n}\nexport default App\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalut%2Freact-native-pin-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalut%2Freact-native-pin-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalut%2Freact-native-pin-view/lists"}