@bscop/react-tabs

Accessible tabs (in React).


Keywords
react tabs, tabs, a11y tabs, accessibile tabs, react accessibile tabs, accessibility, react, react-tabs
License
MIT
Install
npm install @bscop/react-tabs@1.0.2

Documentation

react-tabs

GitHub license npm version CircleCI Status Coverage

Accessible tabs (in React).

View in Storybook.

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