{"id":18896224,"url":"https://github.com/meksiabdou/react-native-switch","last_synced_at":"2026-01-30T12:34:22.493Z","repository":{"id":59030034,"uuid":"534829006","full_name":"meksiabdou/react-native-switch","owner":"meksiabdou","description":"react-native switch","archived":false,"fork":false,"pushed_at":"2025-12-05T15:23:27.000Z","size":475,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-09T01:49:04.765Z","etag":null,"topics":["animation","react-native","react-native-switch","switch"],"latest_commit_sha":null,"homepage":"","language":"Java","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/meksiabdou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-09T22:51:13.000Z","updated_at":"2025-12-05T15:14:19.000Z","dependencies_parsed_at":"2023-01-23T20:00:15.359Z","dependency_job_id":"f7bd635a-419c-4e52-8e3e-73be6a4541f1","html_url":"https://github.com/meksiabdou/react-native-switch","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"6500d617066fd71ee97f854297e0599a7a909775"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/meksiabdou/react-native-switch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meksiabdou%2Freact-native-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meksiabdou%2Freact-native-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meksiabdou%2Freact-native-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meksiabdou%2Freact-native-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meksiabdou","download_url":"https://codeload.github.com/meksiabdou/react-native-switch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meksiabdou%2Freact-native-switch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28912911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["animation","react-native","react-native-switch","switch"],"created_at":"2024-11-08T08:32:57.114Z","updated_at":"2026-01-30T12:34:22.479Z","avatar_url":"https://github.com/meksiabdou.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @meksiabdou/react-native-switch\n\nCustomisable switch component for React Native\n\n![bundlephobia](https://badgen.net/bundlephobia/minzip/@meksiabdou/react-native-switch)\n![downloads](https://badgen.net/npm/dt/@meksiabdou/react-native-switch)\n![npm](https://badgen.net/npm/v/@meksiabdou/react-native-switch)\n![license](https://badgen.net/github/license/meksiabdou/react-native-switch)\n[![Known Vulnerabilities](https://snyk.io/test/github/meksiabdou/react-native-switch/badge.svg?targetFile=package.json)](https://snyk.io/test/github/meksiabdou/react-native-switch?targetFile=package.json)\n\n[![Watch the video](https://imgur.com/TNLNDgt.jpg)](https://i.imgur.com/TNLNDgt.mp4)\n\n## Requirements\n\n- [react-native-reanimated v2.2.0 or higher](https://github.com/software-mansion/react-native-reanimated)\n\n## Installation\n\n```sh\nnpm install @meksiabdou/react-native-switch\n```\n\n```sh\nyarn add @meksiabdou/react-native-switch\n```\n\n## Usage\n\n```tsx\nimport * as React from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport Switch from '@meksiabdou/react-native-switch';\n\nexport default function App() {\n  const [value, setValue] = React.useState(false);\n  return (\n    \u003cView style={styles.container}\u003e\n      \u003cView\u003e\n        \u003cSwitch\n          value={value}\n          width={70}\n          onValueChange={() =\u003e setValue(!value)}\n          activeText=\"ON\"\n          inActiveText=\"OFF\"\n          circleSize={24}\n          textStyle={{ fontSize: 13 }}\n          disabled={false}\n        /\u003e\n      \u003c/View\u003e\n    \u003c/View\u003e\n  );\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    alignItems: 'center',\n    justifyContent: 'center',\n    backgroundColor: '#ccc',\n  },\n});\n```\n\n### Switch Props\n\n| name                | type      | default   |\n| ------------------- | --------- | --------- |\n| width               | number    | 100       |\n| value               | boolean   | false     |\n| onValueChange       | function  | undefined |\n| onAnimationEnd      | function  | undefined |\n| disabled            | boolean   | false     |\n| activeText          | string    | ON        |\n| inActiveText        | string    | OFF       |\n| circleSize          | number    | 30        |\n| switchBorderRadius  | number    | 30        |\n| switchPaddingRight  | number    | 2         |\n| switchPaddingLeft   | number    | 2         |\n| backgroundActive    | string    | #249c00   |\n| backgroundInActive  | string    | #333      |\n| circleActiveColor   | string    | #fff      |\n| circleInActiveColor | string    | #fff      |\n| textStyle           | TextStyle | undefined |\n| switchStyle         | ViewStyle | undefined |\n| circleChildrenActive| ReactElement | undefined |\n| circleChildrenInActive| ReactElement | undefined |\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%2Fmeksiabdou%2Freact-native-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeksiabdou%2Freact-native-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeksiabdou%2Freact-native-switch/lists"}