Standard

Dropdown items can be rendered either as links, when href is provided, or as buttons when it missing. Ommiting href usually means that the item is expected to trigger some JavaScript action.

{%- call ui.util.call(show_example) -%} {%- raw %} {%- call ui.util.call(ui.dropdown, title="Dropdown") -%} {{ ui.dropdown_item("Link", href="?") }} {{ ui.dropdown_item("Action", on={"click": "alert(1)"}) }} {%- endcall %} {%- endraw %} {%- endcall %}