The routable tabs component combines bootstrap v4's tabs with react-router v4's router.
import {Tabs, Tab} from 'c2-routable-tabs'
function Example () {
return (
<Tabs className='my-custom-tabs'>
<Tab to='/' exact title='Home'>
Test
</Tab>
<Tab to='/bar' title='Bar'>
Bar
</Tab>
<Tab to='/baz' title='Baz'>
Baz
</Tab>
</Tabs>
)
}
Additional class name(s) you would like to apple to the container div
.
Tab
components.
React router path.
When true, will activate tab only when the location is matched exactly.
Title of the tab.
Array of objects containing to
and title
props.