Tabs

April 28, 2026 · View on GitHub

Tab strip — a horizontal row of clickable labels. Pair with a Switcher to swap content panes.

Constructor: NewTabs(id, class string) *Tabs

Methods

  • Add(title string) — append a new tab
  • Count() int — number of tabs
  • Get() int — active tab index
  • Set(index int) bool — set active tab; returns true if valid

Events

EventDataDescription
"change"intHighlighted tab changed (←/→ navigation)
"activate"intTab activated via Enter, click, or letter shortcut

Notes

Flags: "focusable".

Keyboard: ←/→ move highlight (fires EvtChange); Enter activates the highlighted tab (fires EvtActivate); typing a letter jumps to the first tab whose label starts with that letter and activates it.

Mouse: single click highlights and activates in one step.