{% props label = null, renderLabelRaw = false, icon = null, url = null, htmlAttributes = {}, renderAsForm = false, # if true, the item will be rendered as a
element (and POST method) instead of an (and GET method) showBlankIcons = true, # (this is mostly an internal option) if false, the blank icon will not be rendered when action icon is null selected = null, # null = regular item; true/false turns the item into a selectable one (radio/checkbox) that shows a trailing checkmark wrapInListItem = true, # (this is an internal option) if false, the
  • wrapper is not rendered, so the item can be embedded in custom markup (e.g. the split dropdown of ItemGroup) %} {% set is_selectable = selected is not null %} {# `aria-checked` is the source of truth for the selected state; the legacy `active` class is mirrored alongside it (kept for one release, in sync with page-color-scheme.js) #} {% set item_class = html_classes('dropdown-item', {'dropdown-item-selectable': is_selectable, active: selected}) %} {% if wrapInListItem %}
  • {% endif %} {% set formId = renderAsForm ? ea_uid('ea-form-') : null %} {% if renderAsForm %}
  • {% endif %}
    {% if icon %} {% elseif showBlankIcons %} {% endif %} {% if label is ea_is_not_empty %}{{ renderLabelRaw ? label|raw : label }}{% endif %} {% if is_selectable %}{% endif %} {% if wrapInListItem %}{% endif %}