Skip to main content

upp-side-menu

A reusable side menu composition widget for application navigation drawers. It provides a shell plus slot components to structure profile/header content, grouped sections, and clickable actions.

Widget Set

The side menu is split into small widgets so each concern stays isolated:

WidgetSelectorResponsibility
Shellupp-side-menuLayout container (header + scrollable content)
Header slotupp-side-menu-headerProjected header block (avatar, title, toggle, etc.)
Header toggleupp-side-menu-header-toggleOptional icon button inside the header
Content slotupp-side-menu-contentProjected body that holds all sections
Sectionupp-side-menu-sectionGroup of related actions with optional title
Actionupp-side-menu-actionSingle clickable menu entry

This mirrors the lateral-menu migration from v3 and keeps business logic in feature components, not in the widget layer.

When to Use

Use upp-side-menu inside upp-application-menu when you need a visual menu layout that is reusable across features. Keep business logic outside this widget and handle events from upp-side-menu-action.

Composition Pattern

The common structure is:

  1. upp-side-menu
  2. upp-side-menu-header (profile and optional toggle)
  3. upp-side-menu-content
  4. One or more upp-side-menu-section
  5. Multiple upp-side-menu-action per section

This allows you to split navigation sections such as "choose view" and "other actions" while keeping a single visual container.

Demo

Source Code

<div class="menu-demo-wrapper">
<upp-side-menu>
<upp-side-menu-header>
<div class="side-menu-profile">
<img class="avatar" src="assets/image/profile.png" alt="demo user">
<div class="text">
<p class="title">Demo User</p>
<p class="subtitle">Demo Place</p>
</div>
<upp-side-menu-header-toggle icon="reorder-three-outline"></upp-side-menu-header-toggle>
</div>
</upp-side-menu-header>

<upp-side-menu-content>
<upp-side-menu-section title="Navigation">
<upp-side-menu-action icon="restaurant" label="Orders"></upp-side-menu-action>
<upp-side-menu-action icon="wine-outline" label="Products"></upp-side-menu-action>
<upp-side-menu-action icon="flower-outline" label="Offers"></upp-side-menu-action>
</upp-side-menu-section>
</upp-side-menu-content>
</upp-side-menu>
</div>

API Reference

upp-side-menu

Main shell container that renders header and scrollable content areas.

No inputs or outputs.

upp-side-menu-header

Header slot wrapper.

No inputs or outputs.

upp-side-menu-header-toggle

Optional icon button designed for header controls.

PropertyTypeDefaultDescription
iconstring'menu-outline'Ionic icon name shown inside the toggle button.
colorstring'medium'Ionic color token used by the toggle button/icon.
disabledbooleanfalseDisables click interaction when true.
EventPayloadDescription
ToggledMouseEventEmitted when the toggle button is clicked.

upp-side-menu-content

Content slot wrapper.

No inputs or outputs.

upp-side-menu-section

Groups related menu actions with an optional section title.

PropertyTypeDefaultDescription
titlestring | nullnullOptional section title shown above projected actions.

upp-side-menu-action

Clickable action row for menu items.

PropertyTypeDefaultDescription
iconstring | nullnullOptional icon shown at the start of the action row.
iconColorstring | nullnullIonic color for the icon. If labelColor is not provided, this color is also applied to the label text.
iconSlot'start' | 'end''start'Slot position for the icon inside the action row.
labelColorstring | nullnullExplicit Ionic color for the label text.
labelstring''Action text label.
disabledbooleanfalseDisables click interaction when true.
activebooleanfalseWhether the action is currently active/selected.
activeColorstring'light'Row color applied when active is true.
lines'none' | 'full''none'Ionic item line style.
EventPayloadDescription
ClickedMouseEventEmitted when the action row is clicked.

Color Behavior (v3 parity)

  • If you pass only iconColor, both icon and label use that color.
  • If you pass both iconColor and labelColor, label uses labelColor.
  • This is intended to match the visual emphasis pattern from the legacy lateral menu.