ElixirOpentui.Widgets.TabSelect (ElixirOpentui v0.2.0)

Copy Markdown View Source

Horizontal tab selection widget.

Displays a row of tabs with optional underline indicator, description line, and scroll arrows. Navigated with left/right arrows or [/] keys.

Props

  • :options — list of tab maps %{name: "", description: nil, value: nil} or strings
  • :selected — currently selected index (default 0)
  • :on_change — message tag sent as {tag, selected_index} on navigation
  • :on_select — message tag sent as {tag, selected_index, option} on Enter
  • :id — element id (required for focus)
  • :tab_width — width of each tab in columns (default: 20)
  • :width — total width of the widget (default: 60)
  • :wrap_selection — wrap at bounds (default: false)
  • :show_description — show selected tab's description (default: true)
  • :show_underline — show underline indicator (default: true)
  • :show_scroll_arrows — show scroll arrows when tabs overflow (default: true)