{"id":42633365,"url":"https://github.com/timelessco/react-native-reanimated-switch","last_synced_at":"2026-01-29T05:26:34.900Z","repository":{"id":57339458,"uuid":"291285598","full_name":"timelessco/react-native-reanimated-switch","owner":"timelessco","description":"🎉  React Native Reanimated Switch 🚦  inspired by UISwitch working with both iOS and Android","archived":false,"fork":false,"pushed_at":"2023-12-16T05:21:33.000Z","size":1027,"stargazers_count":17,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-19T18:10:48.832Z","etag":null,"topics":["react-native","reanimated","switch"],"latest_commit_sha":null,"homepage":"","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/timelessco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-08-29T14:20:56.000Z","updated_at":"2024-01-26T18:50:59.000Z","dependencies_parsed_at":"2023-12-16T06:49:08.976Z","dependency_job_id":null,"html_url":"https://github.com/timelessco/react-native-reanimated-switch","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.15384615384615385","last_synced_commit":"6a9df1bc91e39859563cc010feeae30b3aea0549"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/timelessco/react-native-reanimated-switch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timelessco%2Freact-native-reanimated-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timelessco%2Freact-native-reanimated-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timelessco%2Freact-native-reanimated-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timelessco%2Freact-native-reanimated-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timelessco","download_url":"https://codeload.github.com/timelessco/react-native-reanimated-switch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timelessco%2Freact-native-reanimated-switch/sbom","scorecard":{"id":885824,"data":{"date":"2025-08-11","repo":{"name":"github.com/timelessco/react-native-reanimated-switch","commit":"6a9df1bc91e39859563cc010feeae30b3aea0549"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.2,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: example/RNSwitchExample/android/gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"63 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-f5x2-xv93-4p23","Warn: Project is vulnerable to: GHSA-gmpm-xp43-f7g6","Warn: Project is vulnerable to: GHSA-pf27-929j-9pmm","Warn: Project is vulnerable to: GHSA-327c-qx3v-h673","Warn: Project is vulnerable to: GHSA-x4cf-6jr3-3qvp","Warn: Project is vulnerable to: GHSA-mph8-6787-r8hw","Warn: Project is vulnerable to: GHSA-7mhc-prgv-r3q4","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-4cpg-3vgw-4877","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-rxrc-rgv4-jpvx","Warn: Project is vulnerable to: GHSA-7f53-fmmv-mfjv","Warn: Project is vulnerable to: GHSA-2j79-8pqc-r7x6","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-gff7-g5r8-mg8m","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v","Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx","Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-h6q6-9hqw-rwfv","Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q","Warn: Project is vulnerable to: GHSA-crh6-fp67-6883","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T09:59:37.467Z","repository_id":57339458,"created_at":"2025-08-24T09:59:37.467Z","updated_at":"2025-08-24T09:59:37.467Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28863564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"online","status_checked_at":"2026-01-29T02:00:06.714Z","response_time":59,"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":["react-native","reanimated","switch"],"created_at":"2026-01-29T05:26:34.244Z","updated_at":"2026-01-29T05:26:34.889Z","avatar_url":"https://github.com/timelessco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align='center'\u003e\n  \n  ![npm](https://badgen.net/badge/license/MIT/blue)\n  [![npm](https://badgen.net/npm/dt/react-native-reanimated-switch)](https://www.npmjs.com/package/react-native-reanimated-switch)\n  [![npm](https://badgen.net/npm/v/react-native-reanimated-switch)](https://www.npmjs.com/package/react-native-reanimated-switch)\n\n  \u003ch1\u003eReact Native Reanimated Switch\u003c/h1\u003e\n  \u003cimg width=\"auto\" height=\"550\" src=\"./example/RNSwitchExample/assets/ios.gif\"\u003e\n  \u003cimg width=\"auto\" height=\"550\" src=\"./example/RNSwitchExample/assets/android.gif\"\u003e\n\n\u003c/div\u003e\n\n## :anchor: Installation\n\n```sh\n\nyarn add react-native-reanimated-switch\n# or\nnpm i react-native-reanimated-switch\n\n```\n\n## :family: Dependencies\n\n##### React Native Reanimated\n\n```sh\nnpm install react-native-reanimated\n```\n\nFor iOS\n\n```sh\n\ncd ios \u0026\u0026 pod install \u0026\u0026 cd ..\n\n```\n\n\u003e For detailed instructions check it out [here](https://docs.swmansion.com/react-native-reanimated/docs/next/installation)\n\n\u003e Rebuild the project after adding the dependencies\n\n## :mag: Usage\n\n```js\nimport React, { useState } from \"react\";\nimport { SafeAreaView, StatusBar, StyleSheet, Text, View } from \"react-native\";\nimport RNSwitch from \"./src/Switch\";\n\nconst App = () =\u003e {\n  const [switchState, setSwitchState] = useState(false);\n  const handleOnPressSwitch = (value) =\u003e {\n    setSwitchState(value);\n  };\n  return (\n    \u003c\u003e\n      \u003cStatusBar\n        barStyle=\"dark-content\"\n        translucent={true}\n        backgroundColor=\"white\"\n      /\u003e\n      \u003cSafeAreaView style={styles.container}\u003e\n        \u003cText style={styles.header}\u003eReact Native Reanimated Switch\u003c/Text\u003e\n        \u003cText style={styles.header}\u003eDefault \u003c/Text\u003e\n        \u003cRNSwitch handleOnPress={handleOnPressSwitch} value={switchState} /\u003e\n        \u003cText style={styles.header}\u003eColor Customisable \u003c/Text\u003e\n        \u003cView style={styles.switchContainer}\u003e\n          \u003cRNSwitch\n            handleOnPress={handleOnPressSwitch}\n            activeTrackColor=\"#FE5F8F\"\n            value={switchState}\n          /\u003e\n          \u003cRNSwitch\n            handleOnPress={handleOnPressSwitch}\n            activeTrackColor=\"#667eea\"\n            value={switchState}\n          /\u003e\n          \u003cRNSwitch\n            handleOnPress={handleOnPressSwitch}\n            activeTrackColor=\"#ed8936\"\n            value={switchState}\n          /\u003e\n          \u003cRNSwitch\n            handleOnPress={handleOnPressSwitch}\n            activeTrackColor=\"#feb2b2\"\n            value={switchState}\n          /\u003e\n        \u003c/View\u003e\n      \u003c/SafeAreaView\u003e\n    \u003c/\u003e\n  );\n};\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    display: \"flex\",\n    alignContent: \"center\",\n    justifyContent: \"center\",\n    alignItems: \"center\",\n    backgroundColor: \"white\",\n  },\n  header: {\n    fontSize: 24,\n    paddingVertical: 30,\n  },\n  switchContainer: {\n    display: \"flex\",\n    justifyContent: \"space-between\",\n    flexDirection: \"row\",\n    width: \"90%\",\n  },\n});\n\nexport default App;\n```\n\n## :wrench: Props\n\n| Name               | Description                              | Required | Type     | Default |\n| ------------------ | ---------------------------------------- | -------- | -------- | ------- |\n| value              | State of switch component                | YES      | Boolean  | -       |\n| handleOnPress      | A callback with the current switch state | YES      | Function | -       |\n| activeTrackColor   | The track color when switch is active    | NO       | Color    | #007AFF |\n| inActiveTrackColor | The track color when switch is inactive  | NO       | Color    | #F2F5F7 |\n| thumbColor         | The color of switch thumb                | NO       | Color    | #FFFFFF |\n\n## :tada: Example\n\nCheckout the example [here](https://github.com/timelessco/react-native-reanimated-switch/tree/master/example/RNSearch).\n\n## :notebook: Blog\n\nRead my blog [here](https://medium.com/timeless/react-native-reanimated-switch-83c331af7877?source=friends_link\u0026sk=7155a8907037c741e717d081a4a29498)\n\n## :snowman: Built with ❤️ and\n\n- [react-native](https://www.npmjs.com/package/react-native)\n- [react-native-reanimated](https://docs.swmansion.com/react-native-reanimated/)\n\n## :v: Contributing\n\nPull requests are always welcome! Feel free to open a new GitHub issue for any changes that can be made.\n\n## :man: Author\n\n[Karthik B](https://twitter.com/_iam_karthik)\n\n## :clipboard: License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimelessco%2Freact-native-reanimated-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimelessco%2Freact-native-reanimated-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimelessco%2Freact-native-reanimated-switch/lists"}