{"repo":"github/tab-container-element","free":true,"listed":false,"github":"https://github.com/github/tab-container-element","clone":"git clone https://github.com/github/tab-container-element.git","description":"An accessible tab container element with keyboard support.","language":"JavaScript","stars":380,"topics":["web-components","custom-elements"],"license":"MIT","category":"ui-components","readme_excerpt":"&lt;tab-container&gt; element A accessible tab container element with keyboard support. Follows the ARIA best practices guide on tabs. Installation Usage If none of the tabs have aria-selected=true , then the first tab will be selected automatically. You can also add the default-tab=N attribute to avoid having to set aria-selected=true on the desired tab, where N is the 0-based tab index: Events - tab-container-change (bubbles, cancelable): fired on before a new tab is selected and visibility is updated. event.tab is the tab that will be focused, event.tabIndex is the 0-based index of the tab and tab.panel is the panel that will be shown if the event isn't cancelled. - tab-container-changed (bubbles): fired on after a new tab is selected and visibility is updated. event.tab is the tab that is now active (and will be focused right after this event), event.tabIndex is the 0-based index of the tab and event.panel is the newly visible tab panel. Methods - selectTab(tabIndex, options: {focus?: boolean} = {}) : programmatically selects the tab with the given 0-based index and shows its panel. Fires events as described above. By default, sets focus to the selected tab; call with {focus: false} to prevent this. Parts - ::part(tablist-wrapper) is the wrapper which contains before-tabs , tablist and after-tabs . - ::part(tablist) is the container which wraps all tabs. This element appears in ATs as it is role=tablist . - ::part(panel) is the container housing the currently active tabpa","default_branch":null,"files":null,"tree":[],"storefront":"/r/github","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/github/tab-container-element/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}