@reach/tabs
Accessible React Tabs Component
Last updated 5 years ago by mjackson .
MIT · Repository · Bugs · Original npm
$ cnpm install @reach/tabs 
SYNC missed versions from official npm registry.

@reach/tabs

Stable release MIT license

Docs | Source | WAI-ARIA

An accessible tabs component.

The Tab and TabPanel elements are associated by their order in the tree. None of the components are empty wrappers, each is associated with a real DOM element in the document, giving you maximum control over styling and composition.

You can render any other elements you want inside of Tabs, but TabList should only render Tab elements, and TabPanels should only render TabPanel elements.

import { Tabs, TabList, Tab, TabPanels, TabPanel } from "@reach/tabs";
import "@reach/tabs/styles.css";

function Example() {
  return (
    <Tabs>
      <TabList>
        <Tab>One</Tab>
        <Tab>Two</Tab>
        <Tab>Three</Tab>
      </TabList>

      <TabPanels>
        <TabPanel>
          <p>one!</p>
        </TabPanel>
        <TabPanel>
          <p>two!</p>
        </TabPanel>
        <TabPanel>
          <p>three!</p>
        </TabPanel>
      </TabPanels>
    </Tabs>
  );
}

Current Tags

  • 0.10.3                                ...           latest (5 years ago)
  • 0.4.0-beta.0                                ...           next (6 years ago)

4 Versions

  • 0.17.0                                ...           3 years ago
  • 0.10.1                                ...           5 years ago
  • 0.4.0-beta.0                                ...           6 years ago
  • 0.10.3                                ...           5 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org