Zum Hauptinhalt springen
VelinStyle v1.2.0
⌂ Home
  1. Docs
  2. Erste Schritte
  3. Navigation & Tabs

Navigation & Tabs 1.2.0

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

Reifegrad: Dokumentiert als stabil in VelinStyle 1.2.0. Design Intelligence (Plan / Review / Agent-Meta) ist separat und Beta / Grundlage wo entsprechend angegeben.

Wann verwenden

Wann nicht verwenden

Einfache Tabs

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

Start-Tab-Inhalt.

Profil-Tab-Inhalt.

Einstellungen-Tab-Inhalt.

<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 Komponente sets role="tab" / role="tabpanel", generates ids when missing, and wires aria-controls / aria-labelledby. Inactive panels receive the verborgen attribute. You may also author with role="tab" / role="tabpanel" instead of slots — both selectors are supported.

SlotHinweise
tabTab-Buttons (nach Reihenfolge Panels zugeordnet)
panelPanelinhalt für jeden Tab

CSS parts: tablist, panels.

Tastatur

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

Ereignisse

EreignisDetail
velin-tab-change{ tab } — das ausgewählte Tab-Element

Barrierefreiheit