{"id":27102367,"url":"https://github.com/toggled-apps/react-native-product-selector","last_synced_at":"2025-04-06T15:36:07.193Z","repository":{"id":123021933,"uuid":"325055269","full_name":"toggled-apps/react-native-product-selector","owner":"toggled-apps","description":"This react native module is intended to provide a beautifully animated product selector with an expandable description which you can customise and use in your own projects.","archived":false,"fork":false,"pushed_at":"2021-01-03T11:08:46.000Z","size":15517,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-25T23:42:53.913Z","etag":null,"topics":["component","expo","react-native","typescript"],"latest_commit_sha":null,"homepage":"","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/toggled-apps.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}},"created_at":"2020-12-28T16:03:20.000Z","updated_at":"2022-03-30T11:56:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"2fc0acb6-8752-4b51-a78a-ff4228a39ba0","html_url":"https://github.com/toggled-apps/react-native-product-selector","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"cddf936e839ece1fe3a14347a2b5d697d000c279"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toggled-apps%2Freact-native-product-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toggled-apps%2Freact-native-product-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toggled-apps%2Freact-native-product-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toggled-apps%2Freact-native-product-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toggled-apps","download_url":"https://codeload.github.com/toggled-apps/react-native-product-selector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247504445,"owners_count":20949643,"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":["component","expo","react-native","typescript"],"created_at":"2025-04-06T15:36:05.950Z","updated_at":"2025-04-06T15:36:07.187Z","avatar_url":"https://github.com/toggled-apps.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Product Selector\n\nThis react native module is intended to provide a beautifully animated product selector with an expandable description which you can customise and use in your own projects.\n\n![Example](./assets/react-native-product-selector.gif)\n\n## Usage\n\n```\nyarn add @toggled-apps/react-native-product-selector\nor\nnpm install @toggled-apps/react-native-product-selector\n```\n\n### Example Usage\n```javascript\nimport React from \"react\";\nimport RNProductSelector from \"@toggled-apps/react-native-product-selector\";\n\nconst data = [ ... ];\nconst colors = [... ];\nconst sizes = [ ... ];\n\nconst content = (\n  \u003cView\u003e ... \u003c/View\u003e\n);\n\n\nexport default function App() {\n  return (\n    \u003cRNProductSelector\n      content={content}\n      colors={colors}\n      data={data}\n      onAddToCart={({\n        colorIndex,\n        sizeIndex,\n      }: {\n        colorIndex: number;\n        sizeIndex: number;\n      }) =\u003e {\n        console.log(`color: ${colors[colorIndex]}, size: ${sizes[sizeIndex]}`);\n      }}\n      sizes={sizes}\n      subtitle={\"Subtitle\"}\n      title={\"Title\"}\n    /\u003e\n  );\n}\n```\n\n## Props\n|Name|Type|Required|Default|Description|\n|---|---|---|---|---|\n|colors|array|Optional|[]|An array of colors to be selected|\n|content|any|Optional|null|Component to be rendered in the product description.|\n|data|array|Required|None|An an array of urls of images for your carousel.|\n|onAddToCart|function|Required|None| Function which returns the color index and the size index. ({ colorIndex, sizeIndex }: { colorIndex: number; sizeIndex: number; }) =\u003e void;|\n|sizeIndicatorColor|string|Optional|\"#F8D9E0\"|Hex color which shows the user what size is selected|\n|sizes|array|Optional|[]|Any array of strings of sizes for your products|\n|subtitle|string|Optional|\"\"|Description string.|\n|title|string|Optional|\"\"|Title string.|\n\n## 🚀 Run the example\nThe provided example uses [expo](https://expo.io/).\n\nExpo Project: https://expo.io/@toggled-apps/react-native-product-selector\n\nBuild locally: Navigate to the \"examples\" directory and run:\n\n- Install packages with `yarn` or `npm install`.\n- Run `yarn ios` or `yarn android` or `npm run ios` or `npm run android`.\n\n## 💸 Credit\nCredit also goes to Purrweb UI for making this concept avaliable. The dribble can be found [here](https://dribbble.com/shots/14473051-eCommerce-Store-App-Design)\n\n## 🤟 Contributions\nThis project is mantained by Toggled LTD (@toggled-apps).\n\nWe welcome all contributions to the upkeep and further development of this module! Feel free to raise PRs and Issues 😇\n\n## MIT License\nCopyright 2021 Toggled LTD\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoggled-apps%2Freact-native-product-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoggled-apps%2Freact-native-product-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoggled-apps%2Freact-native-product-selector/lists"}