← Back

Tabs

[basic]

Tab bar with keyboard switching and content panels

Tabs Demo

Tab bar with keyboard switching and content panels

For the full interactive experience:

$ mix raxol.playground

Code
tabs =
  @tab_labels
  |> Enum.with_index()
  |> Enum.map(fn {label, idx} ->
    if idx == model.active do
      text("[ #{label} ]", style: [:bold, :underline])
    else
      text("  #{label}  ")
    end
  end)
demo j/k prev/next / focus demo esc back 20/42 demos