{"id":40145424,"url":"https://github.com/gbhasha/react-native-segmented-control-ui","last_synced_at":"2026-01-19T14:36:44.191Z","repository":{"id":32771205,"uuid":"142008315","full_name":"gbhasha/react-native-segmented-control-ui","owner":"gbhasha","description":"An extendable tab components for React Native similar to iOSSegmentedControl, Primarily built to support both iOS and Android.","archived":false,"fork":false,"pushed_at":"2025-11-18T03:59:50.000Z","size":745,"stargazers_count":9,"open_issues_count":66,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-18T05:35:19.772Z","etag":null,"topics":["iosegmentedcontrol","react-native","segmented-controls","segmentedcontrol","ui-components"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/gbhasha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2018-07-23T12:01:41.000Z","updated_at":"2023-03-10T10:13:10.000Z","dependencies_parsed_at":"2023-01-14T22:10:49.536Z","dependency_job_id":"a19c9f36-1116-4841-b8fb-c58912344919","html_url":"https://github.com/gbhasha/react-native-segmented-control-ui","commit_stats":{"total_commits":42,"total_committers":4,"mean_commits":10.5,"dds":"0.23809523809523814","last_synced_commit":"709d212bd50f98b53c6cd73572e176837c21cbc8"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gbhasha/react-native-segmented-control-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbhasha%2Freact-native-segmented-control-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbhasha%2Freact-native-segmented-control-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbhasha%2Freact-native-segmented-control-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbhasha%2Freact-native-segmented-control-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbhasha","download_url":"https://codeload.github.com/gbhasha/react-native-segmented-control-ui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbhasha%2Freact-native-segmented-control-ui/sbom","scorecard":{"id":420289,"data":{"date":"2025-08-11","repo":{"name":"github.com/gbhasha/react-native-segmented-control-ui","commit":"709d212bd50f98b53c6cd73572e176837c21cbc8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"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":"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":"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":"Code-Review","score":2,"reason":"Found 5/20 approved changesets -- score normalized to 2","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":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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 15 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"}}]},"last_synced_at":"2025-08-19T01:01:41.463Z","repository_id":32771205,"created_at":"2025-08-19T01:01:41.464Z","updated_at":"2025-08-19T01:01:41.464Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28571870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T12:50:50.164Z","status":"ssl_error","status_checked_at":"2026-01-19T12:50:42.704Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["iosegmentedcontrol","react-native","segmented-controls","segmentedcontrol","ui-components"],"created_at":"2026-01-19T14:36:43.591Z","updated_at":"2026-01-19T14:36:44.176Z","avatar_url":"https://github.com/gbhasha.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-segmented-control-ui(for Android/iOS) 🚀\n\n[![npm](https://img.shields.io/npm/v/react-native-segmented-control-ui.svg?style=flat-square \"npm version\")](https://www.npmjs.com/package/react-native-segmented-control-ui)\n[![Monthly Downloads](https://img.shields.io/npm/dm/react-native-segmented-control-ui.svg?style=flat-square )](https://npmjs.org/package/react-native-segmented-control-ui)\n[![Build Status](https://travis-ci.org/gbhasha/react-native-segmented-control-ui.svg?branch=master)](https://travis-ci.org/gbhasha/react-native-segmented-control-ui)\n[![codecov](https://codecov.io/gh/gbhasha/react-native-segmented-control-ui/branch/master/graph/badge.svg)](https://codecov.io/gh/gbhasha/react-native-segmented-control-ui)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/079cec8db0c34a7fabe41011eab8483d)](https://www.codacy.com/app/gbhasha/react-native-segmented-control-ui?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=gbhasha/react-native-segmented-control-ui\u0026amp;utm_campaign=Badge_Grade)\n\n[![NPM](https://nodei.co/npm/react-native-segmented-control-ui.png?compact=true)](https://npmjs.org/package/react-native-segmented-control-ui)\n\n\nAn extendable tab components for React Native similar to iOSSegmentedControl, Primarily built to support both iOS and Android.\n\n\n\n## Usage\n\n```javascript\nimport SegmentedControlTab from 'react-native-segmented-control-ui'\n\nconst ConsumerComponent extends Component {\n\n    constructor(){\n        super()\n        this.state = {\n            selectedIndex: 0\n        };\n    }\n\n    handleIndexChange = (index) =\u003e {\n        this.setState({\n            selectedIndex: index\n        });\n    }\n\n    render() {\n        return (\n            \u003cView\u003e\n                \u003cSegmentedControlTab\n                    values={['First', 'Second', 'Third']}\n                    selectedIndex={this.state.selectedIndex}\n                    onTabPress={this.handleIndexChange}\n                    /\u003e\n            \u003c/View\u003e\n        );\n    }\n}\n```\n\n## API\n\nName | Description | Default | Type\n------|-------------|----------|-----------\nvalues | titles of tabs  | `['One', 'Two', 'Three']` | array\nselectedIndex | index of tab item to be selected initially| [0] | number\nborderRadius | borderRadius of whole tab | 5 | number\ntabsContainerStyle | external styles can be passed to override the default styles of the segmentedControl wrapper| [tabsContainerStyle](#custom-styling)  | object(styles)\ntabStyle | external styles can be passed to override the default styles of the tabs| [tabStyle](#custom-styling)  | object(styles)\ntabTextStyle | external styles can be passed to override the default styles of the tab title| [tabTextStyle](#custom-styling)  | object(styles)\nactiveTabStyle | external styles can be passed to override the default styles of the active tab| [activeTabStyle](#custom-styling)  | object(styles)\nactiveTabTextStyle | external styles can be passed to override the default styles of the active tab text| [activeTabTextStyle](#custom-styling)  | object(styles)\nbadges | badges values to display  | `[1, 2, 3]` | array\ntabBadgeContainerStyle | external style can be passed to override the default style of the badge container | [tabBadgeContainerStyle](#custom-styling)  | object(styles)\nactiveTabBadgeContainerStyle | external style can be passed to override the default style of the active badge container | [activeTabBadgeContainerStyle](#custom-styling)  | object(styles)\ntabBadgeStyle | external style can be passed to override the default style of the badge text | [tabsContainerStyle](#custom-styling)  | object(styles)\nactiveTabBadgeStyle | external style can be passed to override the default style of the active badge text | [activeTabBadgeStyle](#custom-styling)  | object(styles)\nonTabPress | call-back function when a tab is selected | () =\u003e {} | func\nallowFontScaling | whether the segment \u0026 badge text should allow font scaling (default matches React Native default) | true | bool\naccessible | enables accessibility for each tab | true | bool\naccessibilityLabels | Reads out the given text on each tab press when voice over is enabled. If not set, uses the text passed in as values in props as a fallback | ['Label 1', 'Label 2', 'Label 3'] | array\ntestIDs | Unique identifier for each tab which acts as a hook for functional test | ['Label 1', 'Label 2', 'Label 3'] | array\n\n\n## Custom styling\n    ```javascript\n        \u003cSegmentedControlTab\n          tabsContainerStyle={styles.tabsContainerStyle}\n          tabStyle={styles.tabStyle}\n          tabTextStyle={styles.tabTextStyle}\n          activeTabStyle={styles.activeTabStyle}\n          activeTabTextStyle={styles.activeTabTextStyle}\n          selectedIndex={1}\n          allowFontScaling={false}\n          values={['First', 'Second', 'Third']}\n          onPress={this.handleIndexChange}\n        /\u003e\n\n        const styles = StyleSheet.create({\n            tabsContainerStyle: {\n            borderColor: '#706fd3'\n        },\n        tabStyle: {\n            borderLeftColor: '#706fd3',\n            backgroundColor: 'transparent',\n        },\n        activeTabStyle: {\n            backgroundColor: '#33d9b2'\n        },\n        tabTextStyle: {\n            color: '#706fd3'\n        },\n        })\n    ```\n\n\n## Try it out\nYou can try it out default example online using [`Expo Snack`](https://snack.expo.io/@gbhasha/example-of-react-native-segmented-control-ui)\n\nYou can try it out custom styling example online using [`Expo Snack`](https://snack.expo.io/@gbhasha/custom-styling-of-react-native-segmented-control-ui)\n\n### Example\n\nLook at the full example code at [`/Example`](/Example) folder to run the expo app locally. or try with Exponent App [here](https://expo.io/@gbhasha/react-native-segmented-control-ui).\n\n## ScreenShots\n\n### Android\n\n![Demo](https://github.com/gbhasha/react-native-segmented-control-ui/blob/master/Example/screenshots/android-Nexus6p.png)\n\n### iOS\n\n![Demo](https://github.com/gbhasha/react-native-segmented-control-ui/blob/master/Example/screenshots/ios-iphone6.png)\n\n## License\n*MIT*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbhasha%2Freact-native-segmented-control-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbhasha%2Freact-native-segmented-control-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbhasha%2Freact-native-segmented-control-ui/lists"}