{"id":4321,"url":"https://github.com/ainurb/react-native-segment-control","last_synced_at":"2025-08-04T01:32:01.793Z","repository":{"id":57339862,"uuid":"131723038","full_name":"ainurb/react-native-segment-control","owner":"ainurb","description":"Swipeable SegmentedControl component for React Native apps","archived":false,"fork":false,"pushed_at":"2018-10-16T11:32:49.000Z","size":936,"stargazers_count":23,"open_issues_count":2,"forks_count":7,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-11-06T19:17:32.473Z","etag":null,"topics":["animated","animated-tabs","control","react-native","segment","segmentedcontrol","swipe","swipeable","tabs"],"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/ainurb.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}},"created_at":"2018-05-01T14:32:14.000Z","updated_at":"2023-06-25T03:32:17.000Z","dependencies_parsed_at":"2022-09-16T13:00:37.202Z","dependency_job_id":null,"html_url":"https://github.com/ainurb/react-native-segment-control","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainurb%2Freact-native-segment-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainurb%2Freact-native-segment-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainurb%2Freact-native-segment-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainurb%2Freact-native-segment-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ainurb","download_url":"https://codeload.github.com/ainurb/react-native-segment-control/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228545454,"owners_count":17934744,"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":["animated","animated-tabs","control","react-native","segment","segmentedcontrol","swipe","swipeable","tabs"],"created_at":"2024-01-05T20:17:08.183Z","updated_at":"2024-12-07T08:30:30.766Z","avatar_url":"https://github.com/ainurb.png","language":"JavaScript","readme":"# react-native-segment-control\n\n[![Platform](https://img.shields.io/badge/platform-react--native-lightgrey.svg)](http://facebook.github.io/react-native/)\n[![npm version](http://img.shields.io/npm/v/react-native-segment-control.svg)](https://www.npmjs.com/package/react-native-segment-control)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-segment-control.svg?update=7)](http://badge.fury.io/js/react-native-segment-control)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.github.com/testshallpass/react-native-segment-control/master/LICENSE)\n\n## Demo\n\n\u003cimg src=\"https://github.com/ainurb/react-native-segment-control/blob/master/example/example1.gif\" width=\"30%\" /\u003e \u003cimg src=\"https://github.com/ainurb/react-native-segment-control/blob/master/example/example2.gif\" width=\"30%\" /\u003e\n\n## Installation\n\n```\n$ npm install react-native-segment-control --save\n```\n\n## Example\n\n```JSX\nimport React from 'react';\nimport { View, Text, StyleSheet } from 'react-native';\nimport SegmentControl from 'react-native-segment-control';\n\nconst One = () =\u003e {\n  return \u003cText style={styles.text}\u003eThis is first view\u003c/Text\u003e;\n};\nconst Two = () =\u003e {\n  return \u003cText style={styles.text}\u003eThis is second view\u003c/Text\u003e;\n};\nconst segments = [\n  {\n    title: 'One',\n    view: One\n  },\n  {\n    title: 'Two',\n    view: Two\n  }\n];\nconst App = () =\u003e {\n  return (\n    \u003cView style={styles.container}\u003e\n      \u003cSegmentControl segments={segments} /\u003e\n    \u003c/View\u003e\n  );\n};\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    backgroundColor: '#F5F7FA',\n    justifyContent: 'center'\n  },\n  text: {\n    alignSelf: 'center',\n    margin: 50\n  }\n});\n\nexport default App;\n```\n\n## TO-DO's:\n\n- [ ] Add background color property\n- [ ] Add icons as tab titles\n","funding_links":[],"categories":["Components"],"sub_categories":["UI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fainurb%2Freact-native-segment-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fainurb%2Freact-native-segment-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fainurb%2Freact-native-segment-control/lists"}