--- layout: layouts/page.njk title: Tabs description: A set of layered sections of content—known as tab panels—that are displayed one at a time. toc: - label: Usage id: usage children: - label: HTML + JavaScript id: usage-default children: - label: "Step 1: Include the JavaScript files" id: usage-html-js-1 - label: "Step 2: Add your select HTML" id: usage-html-js-2 - label: HTML structure id: usage-html-js-3 - label: JavaScript events id: usage-html-js-4 - label: Jinja and Nunjucks id: usage-macro --- {% from "macros/code_preview.njk" import code_preview %} {% from "macros/code_block.njk" import code_block %} {% from "tabs.njk" import tabs %} {% set code_html %} {% set account_panel %}
Make changes to your account here. Click save when you're done.
Change your password here. After saving, you'll be logged out.
You can either include the JavaScript file for all the components, or just the one for this component by adding this to the <head> of your page:
<div class="tabs"><nav role="tablist" aria-orientation="horizontal"><button role="tab" id="{ TAB_ID }" aria-controls="{ PANEL_ID }" aria-selected="false" tabindex="0">aria-selected attribute is set to true. tabindex="0" is required for keyboard navigation.<div role="tabpanel" id="{ PANEL_ID }" aria-labelledby="{ TAB_ID }" tabindex="-1" aria-selected="false">aria-selected attribute is set to true.basecoat:initializedbasecoat:initialized event on itself.You can use the tabs() Nunjucks or Jinja macro for this component.
Make changes to your account here. Click save when you're done.
Change your password here. After saving, you'll be logged out.