Skip to main content
VelinStyle v1.3.0
⌂ Home
  1. Docs
  2. Components
  3. Navigation
  4. Navs & Tabs

Navs & Tabs 1.2.2

The <velin-tabs> Web Component builds an accessible tabbed interface with roving tabindex, automatic ARIA wiring, and panel show/hide. Deutsch: Navigation Tabs

Maturity: Documented as stable in VelinStyle 1.2.0. Design Intelligence (plan / review / agent meta) is separate and beta / foundation where noted.

When to use

When not

Basic tabs

Place tab triggers in slot="tab" and panels in slot="panel", matched by order. Mark the default with aria-selected="true" (otherwise the first tab is selected).

Home tab content.

Profile tab content.

Settings tab content.

<velin-tabs>
  <button type="button" slot="tab" aria-selected="true">Home</button>
  <button type="button" slot="tab">Profile</button>
  <button type="button" slot="tab">Settings</button>
  <div slot="panel"><p>Home tab content.</p></div>
  <div slot="panel"><p>Profile tab content.</p></div>
  <div slot="panel"><p>Settings tab content.</p></div>
</velin-tabs>

Slots & ARIA

On connect, the component sets role="tab" / role="tabpanel", generates ids when missing, and wires aria-controls / aria-labelledby. Inactive panels receive the hidden attribute. You may also author with role="tab" / role="tabpanel" instead of slots — both selectors are supported.

SlotNotes
tabTab buttons (order-matched to panels)
panelPanel content for each tab

CSS parts: tablist, panels.

Keyboard

The tab list uses roving tabindex via the shared focus manager: / move and activate, Home / End jump to first/last.

Events

EventDetail
velin-tab-change{ tab } — the selected tab element

Accessibility