Skip to content

Tabs

Tabbed interface for switching between content panels. Full keyboard navigation (Arrow keys, Home, End).

// Listen for tab changes
document.querySelector('ac-tabs').addEventListener('ac-tab-change', (e) => {
console.log('Active tab:', e.detail.tab); // → "overview"
});
  • First tab is activated by default
  • Pre-activate with .is-active on a tab button before JS initializes
  • data-active attribute on <ac-tabs> reflects the current tab name
  • Keyboard: ArrowLeft/Right navigate, Home/End jump to first/last