← Back

Checkbox

[basic]

Toggle checkboxes with keyboard navigation

Checkbox Demo

Toggle checkboxes with keyboard navigation

For the full interactive experience:

$ mix raxol.playground

Code
item_rows =
  model.items
  |> Enum.with_index()
  |> Enum.map(fn {item, i} ->
    prefix = DemoHelpers.cursor_prefix(i, model.cursor)
    mark = if item.checked, do: "[x]", else: "[ ]"
    text("#{prefix}#{mark} #{item.label}")
  end)
demo j/k prev/next / focus demo esc back 7/42 demos