<div id="root"></div>
@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");

[data-reach-tab-list][aria-orientation="vertical"] {
  flex-direction: column;
}

[data-reach-tab] {
  display: inline-block;
  border: none;
  padding: 0.8rem 1.2rem;
  margin: 0;
  border-bottom: 5px solid transparent;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
}

[data-reach-tab]:active {
  background: hsla(0, 0%, 0%, 0.05);
}

[data-reach-tab]:disabled {
  opacity: 0.25;
  cursor: default;
}

[data-reach-tab][aria-selected="true"] {
  background: white;
}

[data-reach-tabs] [role="tabpanel"] {
  background: white;
  padding: 2rem;
}

[data-reach-tab-panels] {
  box-shadow: 0 0.5rem 0.5rem rgba(0, 0, 0, 0.2);
}

body {
  font-family: Roboto, sans-serif;
  padding: 2rem;
  background: #EEF1F3;
}
p:not(:last-child) {
  margin: 0 0 1rem 0;
}


[data-reach-tab-list] {
  display: flex;
}
import * as React from 'https://cdn.skypack.dev/react@^16.13.1';
import * as ReactDOM from 'https://cdn.skypack.dev/react-dom@^16.13.1';
import { Tabs, TabList, Tab, TabPanels, TabPanel } from 'https://cdn.skypack.dev/@reach/tabs@^0.10.2';

function MyTabs() {
  return (
    <Tabs className="my-tabs">
      <TabList>
        <Tab>Popular</Tab>
        <Tab>Featured</Tab>
        <Tab>Recent</Tab>
      </TabList>
      <TabPanels>
        <TabPanel>
          <p>one!</p>
        </TabPanel>
        <TabPanel>
          <p>two!</p>
        </TabPanel>
        <TabPanel>
          <p>three!</p>
        </TabPanel>
      </TabPanels>
    </Tabs>
  );
}

const App = () => {
  return(
    <div className="box">
      <MyTabs />
    </div>
  );
}

ReactDOM.render(<App />,
document.getElementById("root"))
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.