{"id":29961869,"url":"https://github.com/pakenfit/react-native-pin-input","last_synced_at":"2025-08-03T23:43:45.026Z","repository":{"id":152113954,"uuid":"625202320","full_name":"pakenfit/react-native-pin-input","owner":"pakenfit","description":"React Native Pin Input made easy🔥","archived":false,"fork":false,"pushed_at":"2025-05-14T17:54:18.000Z","size":23020,"stargazers_count":4,"open_issues_count":3,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T11:45:16.155Z","etag":null,"topics":["otp","otp-verification","pin-input","react-native","textinput"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@pakenfit/react-native-pin-input","language":"TypeScript","has_issues":true,"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/pakenfit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-08T11:31:55.000Z","updated_at":"2025-05-14T17:56:30.000Z","dependencies_parsed_at":"2023-09-30T01:34:51.498Z","dependency_job_id":null,"html_url":"https://github.com/pakenfit/react-native-pin-input","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/pakenfit/react-native-pin-input","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakenfit%2Freact-native-pin-input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakenfit%2Freact-native-pin-input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakenfit%2Freact-native-pin-input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakenfit%2Freact-native-pin-input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pakenfit","download_url":"https://codeload.github.com/pakenfit/react-native-pin-input/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakenfit%2Freact-native-pin-input/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268629832,"owners_count":24281172,"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":["otp","otp-verification","pin-input","react-native","textinput"],"created_at":"2025-08-03T23:43:28.862Z","updated_at":"2025-08-03T23:43:44.414Z","avatar_url":"https://github.com/pakenfit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @pakenfit/react-native-pin-input\n\nPhone Pin Input for React Native.\n\n\u003cp align='center'\u003e\n  \u003cimg src='./assets/demo.gif' width=\"300\"\u003e\n  \u003cimg src='./assets/demo2.gif' width=\"300\"\u003e\n\u003c/p\u003e\n\n\n## Installation\n\n```sh\nnpm install @pakenfit/react-native-pin-input --save\n```\n\n\u003cp align=\"center\"\u003eOr\u003c/p\u003e\n\n```sh\nyarn add @pakenfit/react-native-pin-input\n```\n\n#### Dependencies\nThis library needs these dependencies to be installed in your project before you can use it:\n\n```sh\nnpm install expo-clipboard --save\n```\n\u003cp align=\"center\"\u003eOr\u003c/p\u003e\n\n```sh\nyarn add expo-clipboard\n```\n#### Using Bare React Native ?\nFor `expo-clipboard` to work you need to follow [these additional steps to install expo modules.](https://docs.expo.dev/bare/installing-expo-modules/)\n\n## Features\n\n- Fully customizable\n- OTP autofill support (both `Android` and `iOS`, not tested on `web` should work as well)\n- Compatible with Expo\n- Written in Typescript\n\n---\n\n## Usage\n\n```js\nimport { Button, StyleSheet, View } from 'react-native';\nimport { PinInput, PinInputRef } from '@pakenfit/react-native-pin-input';\n\nexport default function App() {\n  const ref = React.useRef\u003cPinInputRef\u003e(null);\n\n  return (\n    \u003cView style={styles.container}\u003e\n      \u003cPinInput onFillEnded={(otp) =\u003e console.log(otp)} autoFocus ref={ref} /\u003e\n      \u003cButton title=\"Clear all\" onPress={() =\u003e ref.current?.clear()} /\u003e\n    \u003c/View\u003e\n  );\n}\n```\n---\n## Props\n\n### `length`\nThe number of pin inputs to display. `Default: 4`.\n\n---\n\n### `onFillEnded = (opt: string) =\u003e void`\nThe callback function with the final OTP when finish filling the inputs.\n\n\n\n### `inputProps`\nThe props for each TextInput.\n\n---\n\n\n### `inputStyle`\nThe style applied to each `TextInput`.\n\n---\n\n\n### `containerProps`\nThe props for the `View` container.\n\n---\n\n\n### `containerStyle`\nThe style applied to the `View` container.\n\n---\n\n### `autoFocus`\nShould autoFocus the first `input` element.\n\n## API\nThe PinInput component provides the following methods through the PinInputRef:\n\n- `clear()`: clear all the pin inputs\n\n## Types\n\n### PinInputRef\nThe `PinInputRef` type represents the reference to the PinInput component, allowing access to its methods. It has the only method: `clear()` see above.\n\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakenfit%2Freact-native-pin-input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpakenfit%2Freact-native-pin-input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakenfit%2Freact-native-pin-input/lists"}