1.0.0-alpha.7 • Published 7 years ago

butane-tabs v1.0.0-alpha.7

Weekly downloads
8
License
MIT
Repository
-
Last release
7 years ago

Butane Tabs

butane-tabs on NPM Standard JavaScript Style

Accessible tab interface JS library.

Install

Install butane-tabs, and add it to your package.json dev dependencies.

$ npm install butane-tabs --save-dev

Then import it into the file where you'll use it.

import ButaneTabs from 'butane-tabs'

Instantiate

ButaneTabs.init()

Expected DOM structure

Below is the minimum required elements and attributes needed. An additional styling layer is also required to show/hide tab panels via the aria-hidden attribute. There are some basic example styles within docs/styles.css for reference.

<div data-butane-tabs>
  <ul aria-label="Code documentation example" data-butane-tablist>
    <li data-butane-tab="tab-html">HTML</li>
    <li data-butane-tab="tab-css">CSS</li>
    <li data-butane-tab="tab-js">JS</li>
  </ul>

  <section data-butane-tabpanel="tab-html">HTML Content</section>
  <section data-butane-tabpanel="tab-css">CSS Content</section>
  <section data-butane-tabpanel="tab-js">JS Content</section>
</div>

License

MIT. © 2017 Alex Carpenter

1.0.0-alpha.7

7 years ago

1.0.0-alpha.6

7 years ago

1.0.0-alpha.5

7 years ago

1.0.0-alpha.4

7 years ago

1.0.0-alpha.3

7 years ago

1.0.0-alpha.2

7 years ago

1.0.0-alpha.1

7 years ago