@bscop/react-tabs
v1.0.6
Published
Accessible tabs (in React).
Downloads
8
Maintainers
Readme
react-tabs
Accessible tabs (in React).
Install
npm i @bscop/react-tabs
Usage
import Tabs from "@bscop/react-tabs";
function App () {
return (
<Tabs
tabs={[
{
id: "tab-1",
label: "Section one",
renderContent () {
return (
<p>Content of the first tab ...</p>
);
},
},
{
id: "tab-2",
label: "Section two",
renderContent () {
return (
<p>Content of the second tab ...</p>
);
},
}
]}
title="Switch tab"
/>
);
}
Contribute
Read the guidelines.
Run tests
npm test
Coverage
Coverage reports are hosted on codecov.
npm run badge:coverage -- --token=<guid>
Bruno Scopelliti
www.brunoscopelliti.com