← Back
Tabs
[basic]Tab bar with keyboard switching and content panels
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)