{% extends "templates/sink.nunjucks" %} {% block body %}

Menus Sink

Menus can have buttons, split buttions or links as the trigger element. Menu content can be any component.

All Menus will close on Escape key press and on click of document body. Only one Menu will be open at a time.

Menu Default Empty Content

{{ luci.menu() }}

Menu Default With White Background Empty Content

{{ luci.menu(container_class="luci-container--white") }}

Menu Secondary, Small Button Trigger

{% call luci.menu( body_padding=false, trigger={ type: "button", props: { text: "Secondary Small Button Trigger", class: "luci-button--secondary luci-button--small", icon_right: "expand" } } ) %} {{ luci.list_group(list=list.with_icon) }} {% endcall %}

Menu Flat Button Trigger

{% call luci.menu( trigger={ type: "button", props: { text: "Flat Button Trigger", class: "luci-button--flat", icon_right: "expand" } } ) %}

H4 Heading

Long Form Text as menu content.

{% endcall %}

Menu Split Button Trigger

{% call luci.menu( body_padding=false, class="luci-menu--left", trigger={ type: "button", props: { class: "luci-button--secondary luci-button--small", icon_left: "expand" }, button_group: { props: { text: "Split Button", class: "luci-button--secondary luci-button--small" } } } ) %} {{ luci.list_group(list=list.with_icon) }} {% endcall %}

Menu Primary Button Trigger With Medium Blue Background

{% call luci.menu( container_class="luci-container--medium-blue", trigger={ type: "button", props: { text: "Primary Button Trigger", class: "luci-button--primary", icon_right: "expand" } } ) %} {{ luci.link(text="Link as menu content.") }} {% endcall %}

Menu Primary, Small Button Trigger With Dark Blue Container

{% call luci.menu( container_class="luci-container--dark-blue", body_padding=false, trigger={ type: "button", props: { text: "Primary Small Button Trigger", class: "luci-button--primary luci-button--small", icon_right: "expand" } } ) %} {{ luci.list_group(list=list.with_icon) }} {% endcall %}

Menu Icon Button Trigger

{% call luci.menu( trigger={ type: "button", props: { class: "luci-button--icon-only luci-button--flat", icon_left: "add" } } ) %} {{ luci.notification(class="luci-notification--success luci-notification--inline", text="Notification as menu content. Don't do this.") }} {% endcall %}

Menu Small, Icon Button Trigger

{% call luci.menu( trigger={ type: "button", props: { class: "luci-button--icon-only luci-button--flat luci-button--small", icon_left: "add" } } ) %}

H4 Heading

Long Form Text as menu content.

{% endcall %}

Menu With Link Trigger

{% call luci.menu( trigger={ type: "link", props: { text: "Regular Link with Expand Icon", icon_right: "expand" } } ) %} {{ luci.link(text="Link as menu content.") }} {% endcall %}

Menu Left

{% call luci.menu(class="luci-menu--left") %} {{ luci.notification(class="luci-notification--success luci-notification--inline", text="Notification as menu content. Don't do this.") }} {% endcall %}

Menu With Checkboxes And Action Row With Darkest Blue Background

{% call luci.menu(body_padding=false, action_button_text="Submit", container_class="luci-container--darkest-blue") %} {{ luci.list_group(list=list.with_checkboxes) }} {% endcall %}

Menu Left With Compressed Form And Action Row

{% call luci.menu(class="luci-menu--left", action_button_text="Submit" ) %} {% call luci.form(class="luci-form--compressed") %} {% call luci.form_field_group() %} {{ luci.form_label(for="first_name", name="First Name") }} {{ luci.form_input(name="firstName", input_id="first_name") }} {% endcall %} {% call luci.form_field_group() %} {{ luci.form_label(for="last_name", name="Last Name") }} {{ luci.form_input(name="lastName", input_id="last_name") }} {% endcall %} {% call luci.form_field_group() %} {{ luci.form_label(for="phone_number", name="Phone Number") }} {{ luci.form_input(input_type="tel", name="phoneNumber", input_id="phone_number") }} {% endcall %} {% call luci.form_field_group() %} {{ luci.form_label(for="work_email", name="Work Email") }} {{ luci.form_input(input_type="email", name="email", input_id="work_email") }} {% endcall %} {% call luci.form_field_group() %} {{ luci.form_label(for="country", name="Country") }} {{ luci.form_select(name="country", id="country", options=[ { "label": "Afghanistan" }, { "label": "Albania" }, { "label": "Algeria" }, { "label": "United States", "selected": true } ]) }} {% endcall %} {% endcall %} {% endcall %}

Menu Left With Checkboxes And Action Row With White Background Content

{% call luci.menu(class="luci-menu--left", container_class="luci-container--white", body_padding=false, action_button_text="Submit" ) %} {{ luci.list_group(list=list.with_checkboxes) }} {% endcall %}

Menu Custom Trigger

Custom trigger element must have the luci-menu__trigger class.

{% call luci.menu( body_padding=false, custom_trigger='' ) %} {{ luci.list_group(list=list.with_icon) }} {% endcall %}
{% endblock body %}