{"id":17700718,"url":"https://github.com/wrathchaos/react-native-switch-button","last_synced_at":"2025-10-28T11:38:40.642Z","repository":{"id":86534503,"uuid":"395010953","full_name":"WrathChaos/react-native-switch-button","owner":"WrathChaos","description":"Animated switch button with fully customizable React Native Component","archived":false,"fork":false,"pushed_at":"2021-08-16T11:21:48.000Z","size":10057,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-04T16:03:33.938Z","etag":null,"topics":["android","animation","app","app-development","apple","application","button","front-end","google","ios","mobile","react","react-native","reactjs","switch","switch-button","toggle","toggle-button","ui","ux"],"latest_commit_sha":null,"homepage":"https://freakycoder.com","language":"TypeScript","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/WrathChaos.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-11T14:07:46.000Z","updated_at":"2023-12-13T12:46:55.000Z","dependencies_parsed_at":"2023-03-13T19:59:02.119Z","dependency_job_id":null,"html_url":"https://github.com/WrathChaos/react-native-switch-button","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.0625,"last_synced_commit":"6fe3f2d5ff4f675e4169a8f311fde803d339ee7f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":"WrathChaos/react-native-typescript-library-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WrathChaos%2Freact-native-switch-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WrathChaos%2Freact-native-switch-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WrathChaos%2Freact-native-switch-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WrathChaos%2Freact-native-switch-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WrathChaos","download_url":"https://codeload.github.com/WrathChaos/react-native-switch-button/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253819351,"owners_count":21969339,"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","animation","app","app-development","apple","application","button","front-end","google","ios","mobile","react","react-native","reactjs","switch","switch-button","toggle","toggle-button","ui","ux"],"created_at":"2024-10-24T17:42:54.050Z","updated_at":"2025-10-28T11:38:35.585Z","avatar_url":"https://github.com/WrathChaos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"React Native Switch Button\" src=\"assets/logo.png\" width=\"1050\"/\u003e\n\n[![Battle Tested ✅](https://img.shields.io/badge/-Battle--Tested%20%E2%9C%85-03666e?style=for-the-badge)](https://github.com/WrathChaos/react-native-switch-button)\n\n[![React Native Switch Button](https://img.shields.io/badge/-Animated%20switch%20button%20with%20fully%20customizable%20React%20Native%20Component-orange?style=for-the-badge)](https://github.com/WrathChaos/react-native-switch-button)\n\n[![npm version](https://img.shields.io/npm/v/@freakycoder/react-native-switch-button.svg?style=for-the-badge)](https://www.npmjs.com/package/@freakycoder/react-native-switch-button)\n[![npm](https://img.shields.io/npm/dt/@freakycoder/react-native-switch-button.svg?style=for-the-badge)](https://www.npmjs.com/package/@freakycoder/react-native-switch-button)\n![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS-blue.svg?style=for-the-badge)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=for-the-badge)](https://github.com/prettier/prettier)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"React Native Switch Button\"\n        src=\"assets/Screenshots/react-native-switch-button.gif\" /\u003e\n\u003c/p\u003e\n\n# Installation\n\nAdd the dependency:\n\n```bash\nnpm i @freakycoder/react-native-switch-button\n```\n\n## Peer Dependencies\n\n\u003ch5\u003e\u003ci\u003eIMPORTANT! You need install them\u003c/i\u003e\u003c/h5\u003e\n\n```js\n\"@freakycoder/react-native-bounceable\": \"\u003e= 0.2.5\"\n```\n\n# Usage\n\n## Import\n\n```jsx\nimport SwitchButton from \"@freakycoder/react-native-switch-button\";\n```\n\n## Fundamental Usage\n\n```jsx\n\u003cSwitchButton\n  text=\"Notification\"\n  inactiveImageSource={require(\"./assets/notification.png\")}\n  activeImageSource={require(\"./assets/notification-3.png\")}\n  onPress={(isActive: boolean) =\u003e console.log(isActive)}\n/\u003e\n```\n\n## Example Project 😍\n\nYou can checkout the example project 🥰\n\nSimply run\n\n- `npm i`\n- `react-native run-ios/android`\n\nshould work of the example project.\n\n# Configuration - Props\n\n| Property            |     Type     |  Default  | Description                                                        |\n| ------------------- | :----------: | :-------: | ------------------------------------------------------------------ |\n| text                |    string    | undefined | set the text of the button                                         |\n| activeImageSource   | Image Source | undefined | set the active image source                                        |\n| inactiveImageSource | Image Source | undefined | set the inactive image source                                      |\n| isActive            |   boolean    |   false   | set the active state initially                                     |\n| onPress             |   function   |  default  | set your own logic for onPress functionality                       |\n| mainColor           |    string    |  #f1bb7b  | change the main animated color                                     |\n| originalColor       |    string    |   #fff    | change the original/default animated color                         |\n| tintColor           |    string    |  #f1bb7b  | change the tint color for the image                                |\n| disableText         |   boolean    |   false   | disable the text part if you only want to use switch button itself |\n| style               |  ViewStyle   |  default  | set or override the style object for the main container            |\n| textStyle           |  TextStyle   |  default  | set or override the style object for the text                      |\n| imageStyle          |  ImageStyle  |  default  | set or override the style object for the image                     |\n| textContainerStyle  |  ViewStyle   |  default  | set or override the style object for text container                |\n\n## Future Plans\n\n- [x] ~~LICENSE~~\n- [ ] Write an article about the lib on Medium\n\n## Author\n\nFreakyCoder, kurayogun@gmail.com\n\n## License\n\nReact Native Switch Button is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwrathchaos%2Freact-native-switch-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwrathchaos%2Freact-native-switch-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwrathchaos%2Freact-native-switch-button/lists"}