Accessible Tabs Component – tab-container

Category: Javascript | December 31, 2018
Author: github
Views Total: 411 views
Official Page: Go to website
Last Update: December 31, 2018
License: MIT


Accessible Tabs Component – tab-container


tab-container is an easy, accessible tabs compont written in Vanilla JavaScript.

How to use it:

Install & download.

$ npm install @github/tab-container-element --save

Include the tab-container from a CDN.

<script src="[email protected]/dist/index.umd.js"></script>

The example markup.

  <div role="tablist">
    <button type="button" role="tab" aria-selected="true">Tab 1</button>
    <button type="button" role="tab">Tab 2</button>
    <button type="button" role="tab">Tab 3</button>
  <div role="tabpanel">
    Panel 1
  <div role="tabpanel" hidden>
    Panel 2
  <div role="tabpanel" hidden>
    Panel 3

You Might Be Interested In:

Leave a Reply