{"id":16978688,"url":"https://github.com/srph/react-tabs-manager","last_synced_at":"2026-05-20T10:06:57.862Z","repository":{"id":57162205,"uuid":"99481729","full_name":"srph/react-tabs-manager","owner":"srph","description":"Build tab functionalities for complicated layouts. An advanced alternative for react-tabs.","archived":false,"fork":false,"pushed_at":"2017-12-19T02:55:37.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T23:54:35.585Z","etag":null,"topics":["library","react","tabs"],"latest_commit_sha":null,"homepage":"http://usher-diana-72251.netlify.com/","language":"JavaScript","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/srph.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}},"created_at":"2017-08-06T11:21:58.000Z","updated_at":"2017-12-06T04:51:01.000Z","dependencies_parsed_at":"2022-09-06T11:40:53.256Z","dependency_job_id":null,"html_url":"https://github.com/srph/react-tabs-manager","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Freact-tabs-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Freact-tabs-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Freact-tabs-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srph%2Freact-tabs-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srph","download_url":"https://codeload.github.com/srph/react-tabs-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244880550,"owners_count":20525511,"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":["library","react","tabs"],"created_at":"2024-10-14T01:44:01.082Z","updated_at":"2026-05-20T10:06:52.831Z","avatar_url":"https://github.com/srph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Tabs Manager [![npm version](https://img.shields.io/npm/v/@srph/react-tabs-manager.svg?style=flat-square)](https://npmjs.com/packages/@srph/react-tabs-manager) [![Build Status](https://img.shields.io/travis/srph/react-tabs-manager.svg?style=flat-square)](https://travis-ci.org/srph/react-tabs-manager?branch=master)\nBuild tab functionalities for complicated layouts. An advanced alternative for react-tabs.\n\n[View demo](http://usher-diana-72251.netlify.com) / [View examples](storybook/tabs-manager.js)\n\n## Why?\nreact-tabs works very well, but there are projects where the layout is slightly different from your usual tabs. Usual tabs use the following layout:\n\u003c!-- Insert Image --\u003e\n\nBut this isn't intuitive when you have layout like the following:\n\u003c!-- Insert Image --\u003e\n\n### How It Works\n\nThis library takes advantage of context to pass down data to the navigation and view. react-tabs uses clones the element (via `React.cloneElement`), and passes down its props directly.\n\n## Installation\n```\nnpm i @srph/react-tabs-manager\n```\n\n### Script tags\nIf you're not using a bundler like Browserify or Webpack, simply add the script tag after your React script tag.\n\n```html\n\u003c!-- Script tags for React and other libraries --\u003e\n\u003cscript src=\"https://unpkg.com/@srph/react-tabs-manager/dist/react-tabs-manager.min.js\"\u003e\u003c/script\u003e\n```\n\nThis library is exposed as `ReactTabsManager` (e.g., `ReactTabsManager`, `ReactTabsManager.TabView`, `ReactTabsManager.TabItem`).\n\n## Usage\nView [examples](storybook/tabs-manager.js).\n\n```js\nimport React from 'react';\nimport Tabs, {TabView, TabItem} from '@srph/react-tabs-manager';\n\nclass App extends React.Component {\n  render() {\n    return (\n      \u003cTabs\u003e\n        \u003cdiv className=\"app\"\u003e\n          \u003cdiv className=\"panel\"\u003e\n            \u003ch4 className=\"title\"\u003eSubtasks\u003c/h4\u003e\n            \u003cdiv className=\"nav\"\u003e\n              \u003cTabItem index={0}\u003eAll\u003c/TabItem\u003e\n              \u003cTabItem index={1}\u003eOther\u003c/TabItem\u003e\n            \u003c/div\u003e\n          \u003c/div\u003e\n\n          \u003cdiv className=\"content\"\u003e\n            \u003cTabView index={0}\u003e\n              Baz!! \n            \u003c/TabView\u003e\n\n            \u003cTabView index={1}\u003e\n              Bar!!\n            \u003c/TabView\u003e\n          \u003c/div\u003e\n        \u003c/div\u003e\n      \u003c/Tabs\u003e\n    );\n  }\n}\n\nexport default App;\n```\n\n## API Documentation\nHere's a list of props you may use to customize the component for your use-case:\n\n### Tabs\n\n| Prop  | Type | Description |\n| ----- | ---- | ----------- |\n| activeClassName | `function` | The classname to pass to the active `TabItem`. Defaults to `active`. |\n\n\u003e **NOTE**: `Tabs` render all of the children you provide. It doesn't wrap it with a `div`. If you're using `React \u003c= v15`, you will have to wrap the children you pass with div.\n\n### TabItem\n\nAll other props are passed down to the `a` root element as usual.\n\n| Prop  | Type | Description |\n| ----- | ---- | ----------- |\n| index | `number` (required) | The number to be set as active when clicked. |\n\n\u003e **NOTE**: `TabItem` ignores `href` and `role`, hard codes the values `#` and `button` respectively.\n\n### TabView\n\nAll other props are passed down to the `div` root element as usual.\n\n| Prop  | Type | Description |\n| ----- | ---- | ----------- |\n| index | `number` (required) | The number to identify if tab is active |\n\n## Setup\nYou can check the [demo](http://usher-diana-72251.netlify.com), or build it yourself locally:\n```bash\nnpm install\nnpm run start\n```\n\n### Bundling package\n```\nnpm run bundle\n```\n\n### Publish storybook\n```\nnpm run storybook:publish\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Freact-tabs-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrph%2Freact-tabs-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrph%2Freact-tabs-manager/lists"}