This is a react component to render tabs using Bootstrap 4 classes. You should have Bootstrap 4 installed already in your app.
All of the features are demonstrated on the demo site so please see the source file:
https://github.com/freeranger/react-bootstrap-tabs-demo/blob/master/app/App.js
for examples of how to use it in your own applications.
- install the package:
npm install react-bootstrap-tabs --save
With ES2015:
import {Tabs, Tab} from 'react-bootstrap-tabs';
<Tabs onSelect={(index, label) => console.log(label + ' selected')}>
<Tab label="Tab1">Tab 1 content</Tab>
<Tab label="Tab2">Tab 2 content</Tab>
</Tabs>
- Clone this repo
- Inside cloned repo run
npm install
- If you want to run tests:
npm test
ornpm run testonly
ornpm run test-watch
. Write tests in thetests
folder. You need at least Node 4 on your machine to run tests. - If you want to run linting:
npm test
ornpm run lint
. Fix bugs:npm run lint-fix
. You can adjust your.eslintrc
config file. - If you want to run transpilation to ES5 in
dist
folder:npm run prepublish
(standard npm hook).
MIT