react-tab-list
Installation
npm i react-tab-list
Simple usage:
import TabList from "react-tab-list"; const items = name: "First" name: "Second" name: "Third" ; Component { ; { // There will be the active tab data } { return <TabList = =/>; }
Active tab
import TabList from "react-tab-list";Component { ; thisstate = items: name: "First" id: "a1" name: "Second" id: "b2" name: "Third" id: "e5" activeTabId: "b2" thiscallBackFunction = thiscallBackFunction; { this; } { return <TabList = = =/>; }
Of course, you have the possibility not point an active tab(activeTab). In this case, the first item of tabs is assigned by default.
Styles:
You can include less, scss or css file in your project.
"./react-tab-list/styles/tab-list.less";
;
and/or add some custome style:
<TabList = />;