@c8s/tab

[![github](https://badgen.net/badge//nju33,c8s/000?icon=github&list=1)](https://github.com/nju33/c8s/tree/master/components/tab) [![npm:version](https://badgen.net/npm/v/@c8s/tab?icon=npm&label=)](https://www.npmjs.com/package/@c8s/tab) [![typescript](htt

Usage no npm install needed!

<script type="module">
  import c8sTab from 'https://cdn.skypack.dev/@c8s/tab';
</script>

README

@c8s/tab

github npm:version typescript license browserslist code style:prettier

Usage

/**
 * As to prepare of using the `Tab`
 * 
 * ```sh
 * yarn add @c8s/tab @c8s/theme react @types/react styled-components @types/styled-components
 * ```
 */
import Tab from '@c8s/tab';
import {Theme, theme} from '@c8s/theme';

Example

() => (
  <Theme theme={theme}>
    {/* ... */}
      <Tab labels={['foo', 'bar']} position="top">
        {([FooPanel, BarPanel]) => {
          return (
            <>
              <FooPanel>
                <div>
                  <div>foo</div>
                  <div>bar</div>
                  <div>baz</div>
                </div>
              </FooPanel>
              <BarPanel>
                <div>
                  <div>hoge</div>
                  <div>fuga</div>
                  <div>piyo</div>
                </div>
              </BarPanel>
            </>
          );
        }}
      </Tab>
    {/* ... */}
  </Theme>
);

Contributors

Thanks goes to these wonderful people (emoji key):



📖

Aki-Japan

📖

This project follows the all-contributors specification. Contributions of any kind welcome!