See also menu_item/1.
Maturity: Developing
Missing features
- State management: the component renders
aria-checked from the
checked attribute and never changes it, so the caller's on_click
has to update the state and re-render.
Usage
<.menu id="actions-menu" label="Actions">
<:item>
<.menu_item_checkbox on_click={JS.dispatch("myapp:toggle-word-wrap")}>
Word wrap
</.menu_item_checkbox>
</:item>
</.menu>