See also menu_button/1, menu_item/1, and menu_item_checkbox/1.
Maturity: Developing
Missing features
- State management: the component renders
aria-checked from each item's
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" labelledby="actions-button" hidden>
<:item>
<.menu_item_radio_group label="Theme">
<:item on_click={JS.dispatch("switch-theme-light")}>
Light
</:item>
<:item on_click={JS.dispatch("switch-theme-dark")} checked>
Dark
</:item>
</.menu_item_radio_group>
</:item>
</.menu>