Menu Item Checkbox

Renders a menu item checkbox as part of a menu/1 or menu_bar/1.

Read more Read less

See also menu_item/1.

Usage

<.menu label="Actions">
  <:item>
    <.menu_item_checkbox on_click={JS.dispatch("myapp:toggle-word-wrap")}>
      Word wrap
    </.menu_item_checkbox>
  </:item>
</.menu>
<.menu label="Actions">
  <:item>
    <.menu_item_checkbox on_click={%JS{ops: [["dispatch", %{event: "myapp:toggle-word-wrap"}]]}}>
      Word wrap
    </.menu_item_checkbox>
  </:item>
</.menu>