{"id":13835351,"url":"https://github.com/react-component/m-tabs","last_synced_at":"2025-08-29T05:36:49.272Z","repository":{"id":48040268,"uuid":"101866348","full_name":"react-component/m-tabs","owner":"react-component","description":"React Mobile Tabs Component (web \u0026 react-native)","archived":false,"fork":false,"pushed_at":"2021-08-10T11:10:25.000Z","size":1692,"stargazers_count":143,"open_issues_count":34,"forks_count":45,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-21T21:48:08.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://react-component.github.io/m-tabs/","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/react-component.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-30T10:01:05.000Z","updated_at":"2025-06-18T07:41:53.000Z","dependencies_parsed_at":"2022-08-12T17:20:31.886Z","dependency_job_id":null,"html_url":"https://github.com/react-component/m-tabs","commit_stats":null,"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/react-component/m-tabs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fm-tabs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fm-tabs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fm-tabs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fm-tabs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-component","download_url":"https://codeload.github.com/react-component/m-tabs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fm-tabs/sbom","scorecard":{"id":765381,"data":{"date":"2025-08-11","repo":{"name":"github.com/react-component/m-tabs","commit":"6ccb098c0150bf2e544b1aafb0449ec8bf609b20"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"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":"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":"Code-Review","score":1,"reason":"Found 4/28 approved changesets -- score normalized to 1","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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 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-23T00:37:32.173Z","repository_id":48040268,"created_at":"2025-08-23T00:37:32.173Z","updated_at":"2025-08-23T00:37:32.173Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272636161,"owners_count":24967983,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-04T14:01:00.100Z","updated_at":"2025-08-29T05:36:49.255Z","avatar_url":"https://github.com/react-component.png","language":"TypeScript","funding_links":[],"categories":["目录"],"sub_categories":[],"readme":"# rmc-tabs\n---\n\nReact Mobile Tabs Component (web \u0026 react-native), inspired by [react-native-scrollable-tab-view](https://github.com/skv-headless/react-native-scrollable-tab-view)\n\n[![NPM version][npm-image]][npm-url]\n![react](https://img.shields.io/badge/react-%3E%3D_15.2.0-green.svg)\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![gemnasium deps][gemnasium-image]][gemnasium-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: http://img.shields.io/npm/v/rmc-tabs.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rmc-tabs\n[travis-image]: https://img.shields.io/travis/react-component/m-tabs.svg?style=flat-square\n[travis-url]: https://travis-ci.org/react-component/m-tabs\n[coveralls-image]: https://img.shields.io/coveralls/react-component/m-tabs.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/react-component/m-tabs?branch=master\n[gemnasium-image]: http://img.shields.io/gemnasium/react-component/m-tabs.svg?style=flat-square\n[gemnasium-url]: https://gemnasium.com/react-component/m-tabs\n[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square\n[node-url]: http://nodejs.org/download/\n[download-image]: https://img.shields.io/npm/dm/rmc-tabs.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rmc-tabs\n\n## Screenshots\n\n## Development\n\n```\nnpm i\nnpm start\n```\n\n## Example\n\nhttp://localhost:8000/examples/\n\nonline example: http://react-component.github.io/m-tabs/\n\n\n## install\n\n[![rmc-tabs](https://nodei.co/npm/rmc-tabs.png)](https://npmjs.org/package/rmc-tabs)\n\n\n# docs\n\n## Usage\n```jsx\n// normal\n\u003cTabs tabs={[\n    { key: 't1', title: 't1' },\n    { key: 't2', title: 't2' },\n    { key: 't3', title: 't3' },\n    { key: 't4', title: 't4' },\n    { key: 't5', title: 't5' },\n]} initalPage={'t2'}\n\u003e\n  \u003cdiv key=\"t1\"\u003e\u003cp\u003econtent1\u003c/p\u003e\u003c/div\u003e\n  \u003cdiv key=\"t2\"\u003e\u003cp\u003econtent2\u003c/p\u003e\u003c/div\u003e\n  \u003cdiv key=\"t3\"\u003e\u003cp\u003econtent3\u003c/p\u003e\u003c/div\u003e\n  \u003cdiv key=\"t4\"\u003e\u003cp\u003econtent4\u003c/p\u003e\u003c/div\u003e\n  \u003cdiv key=\"t5\"\u003e\u003cp\u003econtent5\u003c/p\u003e\u003c/div\u003e\n\u003c/Tabs\u003e\n\n// single content\n\u003cTabs tabs={[\n    { title: 't1' },\n    { title: 't2' },\n    { title: 't3' },\n    { title: 't4' },\n    { title: 't5' },\n]} onChange={(tab, index) =\u003e {\n    this.setState({\n        scData: JSON.stringify({ index: index + Math.random(), tab })\n    });\n}}\n\u003e\n    \u003cdiv\u003e\n        \u003cp\u003esingle content\u003c/p\u003e\n        \u003cp\u003e{this.state.scData}\u003c/p\u003e\n    \u003c/div\u003e\n\u003c/Tabs\u003e\n\n// single content function\n\u003cTabs tabs={[\n    { title: 't1' },\n    { title: 't2' },\n    { title: 't3' },\n    { title: 't4' },\n    { title: 't5' },\n]}\n\u003e\n    {\n        (index, tab) =\u003e\n            \u003cdiv\u003e\n                \u003cp\u003esingle content\u003c/p\u003e\n                \u003cp\u003e{JSON.stringify({ index: index + Math.random(), tab })}\u003c/p\u003e\n            \u003c/div\u003e\n    }\n\u003c/Tabs\u003e\n\n// renderTabBar e.g: Sticky, react-sticky\n./examples/sticky.tsx\n```\n\n## react-native\n\n```\nnpm run rn-init\nnpm run watch-tsc\nreact-native start\nreact-native run-ios\n```\n\n## API\n\n### Tabs:\n属性 | 说明 | 类型 | 默认值 | 必选\n----|-----|------|------|------\ntabs | tabs data | Models.TabData[] |  | true\ntabBarPosition | TabBar's position | 'top' \\| 'bottom' \\| 'left' \\| 'right' |  top | false\nrenderTabBar | render for TabBar | ((props: TabBarPropsType) =\u003e React.ReactNode) \\| false |  | false\ninitialPage | initial Tab, index or key | number \\| string |  | false\npage | current tab, index or key | number \\| string |  | false\nswipeable | whether to switch tabs with swipe gestrue in the content | boolean |  true | false\nuseOnPan (`web only`) | use scroll follow pan | boolean |  true | false\nprerenderingSiblingsNumber | pre-render nearby # sibling, Infinity: render all the siblings, 0: render current page | number |  1 | false\nanimated | whether to change tabs with animation | boolean |  true | false\nonChange | callback when tab is switched | (tab: Models.TabData, index: number) =\u003e void |  | false\nonTabClick | on tab click | (tab: Models.TabData, index: number) =\u003e void |  | false\ndestroyInactiveTab | destroy inactive tab | boolean |  false | false\ndistanceToChangeTab | distance to change tab, width ratio | number |  0.3 | false\nusePaged | use paged | boolean |  true | false\ntabDirection | tab paging direction | 'horizontal' \\| 'vertical' |  horizontal | false\ntabBarUnderlineStyle | tabBar underline style | React.CSSProperties \\| any |  | false\ntabBarBackgroundColor | tabBar background color | string |  | false\ntabBarActiveTextColor | tabBar active text color | string |  | false\ntabBarInactiveTextColor | tabBar inactive text color | string |  | false\ntabBarTextStyle | tabBar text style | React.CSSProperties \\| any |  | false\n\n### TabBarPropsType (Common):\n属性 | 说明 | 类型 | 默认值 | 必选\n----|-----|------|------|------\ngoToTab | call this function to switch tab | (index: number) =\u003e void |  | true\ntabs | tabs data | Models.TabData[] |  | true\nactiveTab | current active tab | number |  | true\nanimated | use animate | boolean |  true | true\nrenderTab | render the tab of tabbar | (tab: Models.TabData) =\u003e React.ReactNode |  | false\npage | page size of tabbar's tab | number |  5 | false\nonTabClick | on tab click | (tab: Models.TabData, index: number) =\u003e void |  | false\ntabBarPosition | tabBar's position defualt: top | 'top' \\| 'bottom' \\| 'left' \\| 'right' |  | false\ntabBarUnderlineStyle | tabBar underline style | React.CSSProperties \\| any |  | false\ntabBarBackgroundColor | tabBar background color | string |  | false\ntabBarActiveTextColor | tabBar active text color | string |  | false\ntabBarInactiveTextColor | tabBar inactive text color | string |  | false\ntabBarTextStyle | tabBar text style | React.CSSProperties \\| any |  | false\n\n## Test Case\n\n```\nnpm test\nnpm run chrome-test\n```\n\n## Coverage\n\n```\nnpm run coverage\n```\n\nopen coverage/ dir\n\n## License\n\nrmc-tabs is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fm-tabs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-component%2Fm-tabs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fm-tabs/lists"}