ListMenu
ListMenu allows you to present users a listing of options and sub options.
Selector
smart-list-menu
Properties
Events
Methods
Properties
animation"none" | "simple" | "advanced"
Specifies or retrieves the current animation mode. When set to 'none', all animations are completely disabled; otherwise, the selected animation mode is enabled. Use this property to control whether animations play or are suppressed within the component.
Allowed Values
- "none" - animation is disabled
- "simple" - ripple animation is disabled
- "advanced" - all animations are enabled
Default value
"advanced"Example
Set the animation property.
<smart-list-menu animation='none'></smart-list-menu>
Set the animation property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.animation = 'simple';
Get the animation property.
const listmenu = document.querySelector('smart-list-menu');
let animation = listmenu.animation;
autoFocusOnMouseenterboolean
Controls whether the element automatically receives keyboard focus when a user hovers the mouse pointer over it. If enabled, the element will become the active focus target on hover, allowing for keyboard interactions without requiring a click. If disabled, hovering does not change the focus state.
Default value
falseExample
Set the autoFocusOnMouseenter property.
<smart-list-menu auto-focus-on-mouseenter></smart-list-menu>
Set the autoFocusOnMouseenter property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.autoFocusOnMouseenter = false;
Get the autoFocusOnMouseenter property.
const listmenu = document.querySelector('smart-list-menu');
let autoFocusOnMouseenter = listmenu.autoFocusOnMouseenter;
checkableboolean
Enables top-level items within the ListMenu to support checkable states, allowing users to select or deselect these menu items with a checkbox or similar indicator. This feature provides enhanced interactivity by letting users clearly mark individual ListMenu options as checked or unchecked.
Default value
falseExample
Set the checkable property.
<smart-list-menu checkable></smart-list-menu>
Set the checkable property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.checkable = false;
Get the checkable property.
const listmenu = document.querySelector('smart-list-menu');
let checkable = listmenu.checkable;
checkboxesboolean
Controls whether checkboxes and radio buttons can appear in the top-level groups of the ListMenu. This property applies exclusively to the ListMenu component itself, and does not affect subitems within smart-menu-item or smart-menu-items-group elements. For related functionality, refer to the checkable property.
Default value
falseExample
Set the checkboxes property.
<smart-list-menu checkboxes></smart-list-menu>
Set the checkboxes property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.checkboxes = false;
Get the checkboxes property.
const listmenu = document.querySelector('smart-list-menu');
let checkboxes = listmenu.checkboxes;
checkMode"checkbox" | "radioButton"
Configures the selection behavior (check mode) for top-level ListMenu items (groups). This determines whether menu items can be selected individually, allow multiple selections, or behave like radio buttons, affecting how users interact with the menu.
Allowed Values
- "checkbox" - A check box is shown inside a menu group that is selected.
- "radioButton" - A radio dot is shown inside a menu group that is selected.
Default value
"checkbox"Example
Set the checkMode property.
<smart-list-menu check-mode='radioButton'></smart-list-menu>
Set the checkMode property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.checkMode = 'checkbox';
Get the checkMode property.
const listmenu = document.querySelector('smart-list-menu');
let checkMode = listmenu.checkMode;
dataSource{label: string, shortcut: string, value: any, items: []}[]
Specifies the data source to be displayed in the ListMenu component. The data source must be an array of objects, where each object represents a menu item with the following properties:
label: string – The text displayed for the menu item.
value: any – The unique value or identifier associated with the menu item.
shortcut: string (optional) – A keyboard shortcut or hint displayed alongside the menu item.
items: array (optional) – An array of submenu item objects, each following the same structure, allowing for the creation of nested or hierarchical menus.
This structure enables the ListMenu to render both simple and multi-level menus, providing flexibility in how menu options and their shortcuts are presented to users.
Example
Set the dataSource property.
<smart-list-menu data-source='[{ label: "File" }, { label: "Help" }]'></smart-list-menu>
Set the dataSource property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.dataSource = [{ label: 'File', items: [{ label: 'New', shortcut: 'Ctrl+N' }] }];
Get the dataSource property.
const listmenu = document.querySelector('smart-list-menu');
let dataSource = listmenu.dataSource;
disabledboolean
Determines whether the element is interactive or not. When enabled, users can interact with the element. When disabled, the element becomes non-interactive and typically appears visually distinct (e.g., grayed out) to indicate its inactive state.
Default value
falseExample
Set the disabled property.
<smart-list-menu disabled></smart-list-menu>
Set the disabled property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.disabled = false;
Get the disabled property.
const listmenu = document.querySelector('smart-list-menu');
let disabled = listmenu.disabled;
displayLoadingIndicatorboolean
Controls the visibility of the loading indicator. By default, the loading indicator is hidden; setting this option to true will display the indicator, while setting it to false will hide it.
Default value
falseExample
Set the displayLoadingIndicator property.
<smart-list-menu display-loading-indicator></smart-list-menu>
Set the displayLoadingIndicator property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.displayLoadingIndicator = false;
Get the displayLoadingIndicator property.
const listmenu = document.querySelector('smart-list-menu');
let displayLoadingIndicator = listmenu.displayLoadingIndicator;
displayMemberstring
Specifies which field in the data source should be used as the label for each item. This determines the text that will be displayed to represent the item in the user interface.
Default value
"label"Example
Set the displayMember property.
<smart-list-menu display-member='title'></smart-list-menu>
Set the displayMember property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.displayMember = 'caption';
Get the displayMember property.
const listmenu = document.querySelector('smart-list-menu');
let displayMember = listmenu.displayMember;
dropDownAppendTostring | HTMLElement
Specifies a custom outer container to which the minimized dropdown will be appended. By default, the dropdown is appended to the ListMenu container. You can set this property to either an HTML element or a string representing the ID of an HTML element.
Example
Set the dropDownAppendTo property.
<smart-list-menu drop-down-append-to='body'></smart-list-menu>
Set the dropDownAppendTo property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.dropDownAppendTo = 'customContainer';
Get the dropDownAppendTo property.
const listmenu = document.querySelector('smart-list-menu');
let dropDownAppendTo = listmenu.dropDownAppendTo;
dropDownOverlayboolean
If this property is enabled, opening the element's minimized dropdown will display a transparent overlay that covers the area between the dropdown and the rest of the page content. This overlay visually separates the dropdown from other elements on the page and can also intercept clicks to prevent interactions with content outside the dropdown until it is closed.
Default value
falseExample
Set the dropDownOverlay property.
<smart-list-menu drop-down-overlay></smart-list-menu>
Set the dropDownOverlay property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.dropDownOverlay = false;
Get the dropDownOverlay property.
const listmenu = document.querySelector('smart-list-menu');
let dropDownOverlay = listmenu.dropDownOverlay;
dropDownPosition"auto" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "overlay-left" | "overlay-right"
Specifies or retrieves the direction in which the ListMenu's minimized dropdown expands when opened, such as upward or downward. This property determines the alignment and positioning of the dropdown relative to the ListMenu component.
Allowed Values
- "auto" - The position is automatically determined by measuring the available distance around the element for the drop down to open freely without being clipped by the edges of the browser. By default the drop down will try to open below the element. If the available space is not enough for the popup to appear it will open in one of the following directions, if possible: top, over.
- "top-left" - The drop down opens above and to the left of the seleted Item Group.
- "top-right" - The drop down opens above and to the right of the seleted Item Group.
- "bottom-left" - The drop down opens below and to the left of the seleted Item Group.
- "bottom-right" - The drop down opens below and to the right of the seleted Item Group.
- "overlay-left" - The drop down opens over the seleted Item Group by aligning to the left.
- "overlay-right" - The drop down opens over and to the left of the seleted Item Group by aligning to the right.
Default value
"auto"Example
Set the dropDownPosition property.
<smart-list-menu drop-down-position='top-left'></smart-list-menu>
Set the dropDownPosition property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.dropDownPosition = 'top-right';
Get the dropDownPosition property.
const listmenu = document.querySelector('smart-list-menu');
let dropDownPosition = listmenu.dropDownPosition;
enableMouseWheelActionboolean
Controls whether users can scroll through menu items that overflow the visible area by using the mouse wheel. When enabled, using the mouse wheel will navigate vertically through menu items not currently visible within the menu’s viewport. When disabled, mouse wheel scrolling will have no effect on overflowing menu content.
Default value
falseExample
Set the enableMouseWheelAction property.
<smart-list-menu enable-mouse-wheel-action></smart-list-menu>
Set the enableMouseWheelAction property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.enableMouseWheelAction = true;
Get the enableMouseWheelAction property.
const listmenu = document.querySelector('smart-list-menu');
let enableMouseWheelAction = listmenu.enableMouseWheelAction;
filterableboolean
Controls the activation of menu item filtering functionality. When enabled, a filter input field appears at the top of the menu component, allowing users to search and display only the menu items that match the entered query. Note that filtering is limited to items currently rendered or visible in the menu's current view; items not present in the view will not be affected by the filter.
Default value
falseExample
Set the filterable property.
<smart-list-menu filterable></smart-list-menu>
Set the filterable property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.filterable = false;
Get the filterable property.
const listmenu = document.querySelector('smart-list-menu');
let filterable = listmenu.filterable;
filterInputPlaceholderstring
Specifies the placeholder text displayed inside the filter input field, guiding users on the expected input or action.
Default value
""Example
Set the filterInputPlaceholder property.
<smart-list-menu filter-input-placeholder='Enter a value:'></smart-list-menu>
Set the filterInputPlaceholder property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.filterInputPlaceholder = 'Awaiting entry:';
Get the filterInputPlaceholder property.
const listmenu = document.querySelector('smart-list-menu');
let filterInputPlaceholder = listmenu.filterInputPlaceholder;
filterMemberstring
Specifies which property of the MenuItem will be used as the filtering criterion. By default, the filtering is performed using the label property of each MenuItem. You can change this setting to use other properties instead, such as value if you want to filter based on the MenuItem's value property, or textContent if you prefer to filter using the text content within the MenuItem. Additionally, you may specify any other property name to customize the filtering behavior according to your application's requirements.
Default value
"label"Example
Set the filterMember property.
<smart-list-menu filter-member='value'></smart-list-menu>
Set the filterMember property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.filterMember = 'textContent';
Get the filterMember property.
const listmenu = document.querySelector('smart-list-menu');
let filterMember = listmenu.filterMember;
filterMode"contains" | "containsIgnoreCase" | "doesNotContain" | "doesNotContainIgnoreCase" | "equals" | "equalsIgnoreCase" | "startsWith" | "startsWithIgnoreCase" | "endsWith" | "endsWithIgnoreCase"
Specifies the method used to filter or process data, such as selecting items based on certain criteria, applying search terms, or excluding specific values. This setting controls how data is displayed or retrieved according to the selected filtering mode.
Allowed Values
- "contains" - displays only items with labels that contain the filter string (case sensitive)
- "containsIgnoreCase" - displays only items with labels that contain the filter string (case insensitive)
- "doesNotContain" - displays only items with labels that do not contain the filter string (case sensitive)
- "doesNotContainIgnoreCase" - displays only items with labels that do not contain the filter string (case insensitive)
- "equals" - displays only items with labels that equal the filter string (case sensitive)
- "equalsIgnoreCase" - displays only items with labels that equal the filter string (case insensitive)
- "startsWith" - displays only items with labels that start with the filter string (case sensitive)
- "startsWithIgnoreCase" - displays only items with labels that start with the filter string (case insensitive)
- "endsWith" - displays only items with labels that end with the filter string (case sensitive)
- "endsWithIgnoreCase" - displays only items with labels that end with the filter string (case insensitive)
Default value
"containsIgnoreCase"Example
Set the filterMode property.
<smart-list-menu filter-mode='contains'></smart-list-menu>
Set the filterMode property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.filterMode = 'equals';
Get the filterMode property.
const listmenu = document.querySelector('smart-list-menu');
let filterMode = listmenu.filterMode;
groupedboolean
If enabled, the items will be organized into groups based on the first letter of each item's name. Within each group, the items will be sorted alphabetically.
Default value
falseExample
Set the grouped property.
<smart-list-menu grouped></smart-list-menu>
Set the grouped property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.grouped = false;
Get the grouped property.
const listmenu = document.querySelector('smart-list-menu');
let grouped = listmenu.grouped;
itemsMemberstring
Specifies the name of the field within the data source that contains the collection of subitems associated with each item group. This field is used to retrieve and bind the subitems for display or processing within the application.
Default value
"items"Example
Set the itemsMember property.
<smart-list-menu items-member='children'></smart-list-menu>
Set the itemsMember property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.itemsMember = 'subitems';
Get the itemsMember property.
const listmenu = document.querySelector('smart-list-menu');
let itemsMember = listmenu.itemsMember;
loadingIndicatorPlaceholderstring
Specifies the text to display alongside the loading indicator when the loader is visible and positioned at the top or bottom of the container. This text provides context or feedback to users during loading operations.
Default value
"Loading..."Example
Set the loadingIndicatorPlaceholder property.
<smart-list-menu loading-indicator-placeholder='Incoming data'></smart-list-menu>
Set the loadingIndicatorPlaceholder property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.loadingIndicatorPlaceholder = 'LOADING...';
Get the loadingIndicatorPlaceholder property.
const listmenu = document.querySelector('smart-list-menu');
let loadingIndicatorPlaceholder = listmenu.loadingIndicatorPlaceholder;
loadingIndicatorPosition"bottom" | "center" | "top"
Specifies the exact location where the loading indicator will appear within the parent element. This controls whether the loading indicator is displayed at the top, center, bottom, or another defined position inside the element’s boundaries.
Allowed Values
- "bottom" - Positions the loading indicator at the bottom of the list menu.
- "center" - Positions the loading indicator at the center of the list menu.
- "top" - Positions the loading indicator at the bottom of the list menu.
Default value
"center"Example
Set the loadingIndicatorPosition property.
<smart-list-menu loading-indicator-position='bottom'></smart-list-menu>
Set the loadingIndicatorPosition property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.loadingIndicatorPosition = 'top';
Get the loadingIndicatorPosition property.
const listmenu = document.querySelector('smart-list-menu');
let loadingIndicatorPosition = listmenu.loadingIndicatorPosition;
unlockKeystring
Defines or retrieves the unlockKey property, a unique identifier or code required to unlock and grant access to the product’s features or content.
Default value
""Example
Set the unlockKey property.
<smart-list-menu unlock-key=''></smart-list-menu>
Set the unlockKey property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.unlockKey = '1111-2222-3333-4444-5555';
Get the unlockKey property.
const listmenu = document.querySelector('smart-list-menu');
let unlockKey = listmenu.unlockKey;
localestring
Specifies or retrieves the current language code (such as "en", "fr", or "es"), which determines the set of localized messages to use from the messages property. This property ensures that the appropriate language-specific messages are displayed to users based on their language selection or system settings.
Default value
"en"Example
Set the locale property.
<smart-list-menu locale='de'></smart-list-menu>
Set the locale property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.locale = 'fr';
Get the locale property.
const listmenu = document.querySelector('smart-list-menu');
let locale = listmenu.locale;
localizeFormatFunctionfunction | null
A callback function that allows you to define custom formatting for messages returned by the Localization Module. Use this to modify how localized strings are generated and displayed, such as altering text templates, injecting dynamic values, or adjusting message structure before they are delivered to your application.
Example
Set the localizeFormatFunction property.
<smart-list-menu localize-format-function='function(defaultMessage, message, messageArguments){return '...'}'></smart-list-menu>
Set the localizeFormatFunction property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.localizeFormatFunction = function(defaultMessage, message, messageArguments){return '...'};
Get the localizeFormatFunction property.
const listmenu = document.querySelector('smart-list-menu');
let localizeFormatFunction = listmenu.localizeFormatFunction;
messagesobject
Defines or retrieves an object containing localized strings used throughout the widget’s interface. This property is intended to facilitate internationalization by allowing you to provide translations for various UI text elements. It is typically used in combination with the locale property, which determines the currently active language or regional format.
Default value
"en": {
"propertyUnknownType": "'{{name}}' property is with undefined 'type' member!",
"propertyInvalidValue": "Invalid '{{name}}' property value! Actual value: {{actualValue}}, Expected value: {{value}}!",
"propertyInvalidValueType": "Invalid '{{name}}' property value type! Actual type: {{actualType}}, Expected type: {{type}}!",
"elementNotInDOM": "Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.",
"moduleUndefined": "Module is undefined.",
"missingReference": "{{elementType}}: Missing reference to {{files}}.",
"htmlTemplateNotSuported": "{{elementType}}: Browser doesn't support HTMLTemplate elements.",
"invalidTemplate": "{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM."
}
Example
Set the messages property.
<smart-list-menu messages='{"de":{"propertyUnknownType":"Die Eigenschaft '{{name}}' hat ein nicht definiertes 'type'-Member!","propertyInvalidValue":"Ungultiger Eigenschaftswert '{{name}}'! Aktueller Wert: {{actualValue}}, Erwarteter Wert: {{value}}!","propertyInvalidValueType":"Ungultiger Eigenschaftswert '{{name}}'! Aktueller Wert: {{actualType}}, Erwarteter Wert: {{type}}!","elementNotInDOM":"Element existiert nicht in DOM! Bitte fugen Sie das Element zum DOM hinzu, bevor Sie eine Methode aufrufen.","moduleUndefined":"Modul ist nicht definiert.","missingReference":"{{elementType}}: Fehlender Verweis auf {{files}}.","htmlTemplateNotSuported":"{{elementType}}: Browser unterstutzt keine HTMLTemplate-Elemente.","invalidTemplate":"{{elementType}}: '{{property}}' Die Eigenschaft akzeptiert eine Zeichenfolge, die mit der ID eines HTMLTemplate-Elements aus dem DOM ubereinstimmen muss."}}'></smart-list-menu>
Set the messages property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.messages = {"en":{"propertyUnknownType":"'{{name}}' property is with undefined 'type' member!","propertyInvalidValue":"Invalid '{{name}}' property value! Actual value: {{actualValue}}, Expected value: {{value}}!","propertyInvalidValueType":"Invalid '{{name}}' property value type! Actual type: {{actualType}}, Expected type: {{type}}!","elementNotInDOM":"Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.","moduleUndefined":"Module is undefined.","missingReference":"{{elementType}}: Missing reference to {{files}}.","htmlTemplateNotSuported":"{{elementType}}: Browser doesn't support HTMLTemplate elements.","invalidTemplate":"{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM."}};
Get the messages property.
const listmenu = document.querySelector('smart-list-menu');
let messages = listmenu.messages;
minimizeIconTemplatestring
Enables the use of a custom minimize icon by specifying an HTMLTemplateElement. This property accepts either the ID of an HTMLTemplateElement (as a string) or a direct reference to the HTMLTemplateElement instance. The content of the provided template will be rendered in place of the default minimize icon.
Default value
"null"Example
Set the minimizeIconTemplate property.
<smart-list-menu minimize-icon-template='template1'></smart-list-menu>
Set the minimizeIconTemplate property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.minimizeIconTemplate = 'template2';
Get the minimizeIconTemplate property.
const listmenu = document.querySelector('smart-list-menu');
let minimizeIconTemplate = listmenu.minimizeIconTemplate;
minimizeWidthnumber | null
Specifies the minimum width, in pixels, that the ListMenu must reach before automatically switching from its normal (expanded) mode to minimized mode. If this value is set to null, the ListMenu will remain in its normal mode regardless of its width and will not minimize automatically.
Example
Set the minimizeWidth property.
<smart-list-menu minimize-width='100'></smart-list-menu>
Set the minimizeWidth property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.minimizeWidth = 200;
Get the minimizeWidth property.
const listmenu = document.querySelector('smart-list-menu');
let minimizeWidth = listmenu.minimizeWidth;
overflow"auto" | "hidden" | "scroll"
Defines or retrieves the behavior of the ListMenu's scroll buttons, specifying how they appear and function when the menu content exceeds the visible area. This property controls whether scroll buttons are shown, when they become visible, and how users can interact with them to navigate through the list.
Allowed Values
- "auto" - The scroll buttons are automatically shown/hidden depending on the visibility of the items. If there's an item that is not visible the appropriate scroll button will appear in order to fully scroll to it.
- "hidden" - The scroll buttons are hidden.
- "scroll" - The scroll buttons are always visible.
Default value
"auto"Example
Set the overflow property.
<smart-list-menu overflow='hidden'></smart-list-menu>
Set the overflow property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.overflow = 'scroll';
Get the overflow property.
const listmenu = document.querySelector('smart-list-menu');
let overflow = listmenu.overflow;
readonlyboolean
If the element has the "readonly" attribute, users can view its content but cannot modify or edit it. While the element remains focusable and its text can be selected or copied, any user attempts to change its value will be blocked, ensuring the data remains unchanged.
Default value
falseExample
Set the readonly property.
<smart-list-menu readonly></smart-list-menu>
Set the readonly property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.readonly = true;
Get the readonly property.
const listmenu = document.querySelector('smart-list-menu');
let readonly = listmenu.readonly;
rightToLeftboolean
Specifies or retrieves a value that determines whether the element's text and layout direction are set to support right-to-left (RTL) languages, such as Arabic or Hebrew. When enabled, the element and its contents will display text and align elements according to RTL conventions.
Default value
falseExample
Set the rightToLeft property.
<smart-list-menu right-to-left></smart-list-menu>
Set the rightToLeft property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.rightToLeft = false;
Get the rightToLeft property.
const listmenu = document.querySelector('smart-list-menu');
let rightToLeft = listmenu.rightToLeft;
scrollMode"scrollbar" | "scrollButtons"
Specifies whether to display a traditional scrollbar or custom scroll buttons when the content exceeds the boundaries of an element’s container. This setting controls the method users can use to navigate overflow content within the element.
Allowed Values
- "scrollbar" - displays scrollbar
- "scrollButtons" - displays scroll buttons
Default value
"scrollbar"Example
Set the scrollMode property.
<smart-list-menu scroll-mode='scrollButtons'></smart-list-menu>
Set the scrollMode property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.scrollMode = 'scrollbar';
Get the scrollMode property.
const listmenu = document.querySelector('smart-list-menu');
let scrollMode = listmenu.scrollMode;
themestring
Specifies the visual theme to apply to the element. The selected theme controls the element’s overall appearance, including colors, fonts, and styling, ensuring a consistent look and feel throughout the user interface.
Default value
""Example
Set the theme property.
<smart-list-menu theme='blue'></smart-list-menu>
Set the theme property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.theme = 'red';
Get the theme property.
const listmenu = document.querySelector('smart-list-menu');
let theme = listmenu.theme;
unfocusableboolean
When set to true, the element becomes unfocusable, meaning it cannot receive input focus via keyboard navigation (such as the Tab key), mouse clicks, or scripting methods.
Default value
falseExample
Set the unfocusable property.
<smart-list-menu unfocusable></smart-list-menu>
Set the unfocusable property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.unfocusable = false;
Get the unfocusable property.
const listmenu = document.querySelector('smart-list-menu');
let unfocusable = listmenu.unfocusable;
valueMemberstring
Specifies the name of the field in the data source whose value will be assigned as the item's value property. This field is used to uniquely identify each item within the data collection.
Default value
"value"Example
Set the valueMember property.
<smart-list-menu value-member='info'></smart-list-menu>
Set the valueMember property by using the HTML Element's instance.
const listmenu = document.querySelector('smart-list-menu');
listmenu.valueMember = 'details';
Get the valueMember property.
const listmenu = document.querySelector('smart-list-menu');
let valueMember = listmenu.valueMember;
Events
expandCustomEvent
This event is triggered whenever a smart-menu-items-group component is expanded by the user, indicating that the associated menu group has been opened to reveal its child menu items. Developers can use this event to perform actions such as loading dynamic content, updating UI states, or triggering additional functionality when a menu group becomes visible.
- Bubbles Yes
- Cancelable No
- Interface CustomEvent
- Event handler property onExpand
Arguments
evCustomEvent
ev.detailObject
ev.detail.item - The menu item that was expanded.
ev.detail.label - The label of the item that was expanded.
ev.detail.value - The value of the item that was expanded.
ev.detail.path - The path of the item that was expanded, e.g. '0.1', '1.1.2'.
ev.detail.children - The children of the item that was expanded.
Methods
isDefaultPrevented
Returns true if the event was prevented by any of its subscribers.
Returns
boolean true if the default action was prevented. Otherwise, returns false.
preventDefault
The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.
stopPropagation
The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
Example
Set up the event handler of expand event.
const listmenu = document.querySelector('smart-list-menu'); listmenu.addEventListener('expand', function (event) { const detail = event.detail, item = detail.item, label = detail.label, value = detail.value, path = detail.path, children = detail.children; // event handling code goes here. })
itemCheckChangeCustomEvent
This event is triggered whenever the checked or unchecked state of a menu item is modified—such as when a user selects or deselects a checkbox or toggle option within a menu. It allows you to respond to changes in the check state of menu items, enabling dynamic UI updates or additional actions based on the user's selection.
- Bubbles Yes
- Cancelable No
- Interface CustomEvent
- Event handler property onItemCheckChange
Arguments
evCustomEvent
ev.detailObject
ev.detail.item - The menu item which state was changed.
ev.detail.label - The label of the item which state was changed.
ev.detail.value - The value of the item which state was changed.
ev.detail.checked - The checked state of the toggled item. If false the item is not toggled.
Methods
isDefaultPrevented
Returns true if the event was prevented by any of its subscribers.
Returns
boolean true if the default action was prevented. Otherwise, returns false.
preventDefault
The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.
stopPropagation
The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
Example
Set up the event handler of itemCheckChange event.
const listmenu = document.querySelector('smart-list-menu'); listmenu.addEventListener('itemCheckChange', function (event) { const detail = event.detail, item = detail.item, label = detail.label, value = detail.value, checked = detail.checked; // event handling code goes here. })
itemClickCustomEvent
This event is triggered whenever a user interacts with the menu by clicking on one of its list items. The event provides details about the specific item selected, allowing you to execute custom logic in response to the user's selection.
- Bubbles Yes
- Cancelable No
- Interface CustomEvent
- Event handler property onItemClick
Arguments
evCustomEvent
ev.detailObject
ev.detail.item - The menu item that was clicked.
ev.detail.label - The label of the clicked item.
ev.detail.value - The value of the clicked item.
Methods
isDefaultPrevented
Returns true if the event was prevented by any of its subscribers.
Returns
boolean true if the default action was prevented. Otherwise, returns false.
preventDefault
The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.
stopPropagation
The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
Example
Set up the event handler of itemClick event.
const listmenu = document.querySelector('smart-list-menu'); listmenu.addEventListener('itemClick', function (event) { const detail = event.detail, item = detail.item, label = detail.label, value = detail.value; // event handling code goes here. })
scrollBottomReachedCustomEvent
This event is triggered when the user reaches the bottom of the ListMenu by scrolling. It can be used to detect when additional actions are needed, such as loading more items or displaying a message, once the user has viewed all currently visible content in the ListMenu.
- Bubbles Yes
- Cancelable No
- Interface CustomEvent
- Event handler property onScrollBottomReached
Arguments
evCustomEvent
Methods
isDefaultPrevented
Returns true if the event was prevented by any of its subscribers.
Returns
boolean true if the default action was prevented. Otherwise, returns false.
preventDefault
The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.
stopPropagation
The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
Example
Set up the event handler of scrollBottomReached event.
const listmenu = document.querySelector('smart-list-menu'); listmenu.addEventListener('scrollBottomReached', function (event) { // event handling code goes here. })
swipeleftCustomEvent
This event is triggered when the user performs a leftward swipe gesture within the ListMenu component, typically indicating an intent to reveal additional options, delete an item, or navigate to a different view. It is designed to respond exclusively to horizontal swipes that start inside the ListMenu area.
- Bubbles Yes
- Cancelable No
- Interface CustomEvent
- Event handler property onSwipeleft
Arguments
evCustomEvent
Methods
isDefaultPrevented
Returns true if the event was prevented by any of its subscribers.
Returns
boolean true if the default action was prevented. Otherwise, returns false.
preventDefault
The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.
stopPropagation
The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
Example
Set up the event handler of swipeleft event.
const listmenu = document.querySelector('smart-list-menu'); listmenu.addEventListener('swipeleft', function (event) { // event handling code goes here. })
swiperightCustomEvent
This event is triggered when the user performs a rightward swipe gesture within the ListMenu component. It can be used to detect and handle user interactions such as revealing additional options, navigating to a new view, or initiating specific actions in response to the right swipe inside the ListMenu area.
- Bubbles Yes
- Cancelable No
- Interface CustomEvent
- Event handler property onSwiperight
Arguments
evCustomEvent
Methods
isDefaultPrevented
Returns true if the event was prevented by any of its subscribers.
Returns
boolean true if the default action was prevented. Otherwise, returns false.
preventDefault
The preventDefault() method prevents the default action for a specified event. In this way, the source component suppresses the built-in behavior that follows the event.
stopPropagation
The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
Example
Set up the event handler of swiperight event.
const listmenu = document.querySelector('smart-list-menu'); listmenu.addEventListener('swiperight', function (event) { // event handling code goes here. })
Methods
addItem( Item: HTMLElement, Parent?: HTMLElement | string): void
Appends a new item to the end of the existing list, expanding the list by one element.
Arguments
ItemHTMLElement
A smart-menu-item to add to the List Menu.
Parent?HTMLElement | string
The smart-menu-items-group (or its id or numeric path) to add the item to.
Invoke the addItem method.
const listmenu = document.querySelector('smart-list-menu'); listmenu.addItem("document.createElement('smart-menu-item')","0");
Try a demo showcasing the addItem method.
back( animation?: boolean): void
Navigates to the previous page within the group of menu items (`smart-menu-items-group`). This function moves the user’s focus or view to the preceding set of menu options, enabling seamless backward navigation in multi-page or scrollable menu interfaces.
Arguments
animation?boolean
If set to false, disables collapse animation even if animation is enabled for the element
Invoke the back method.
const listmenu = document.querySelector('smart-list-menu'); listmenu.back();
changePage( id: string): void
Navigates the user to a specific page or section within the application identified as "smart-menu-items-group." This action typically triggers a transition or redirect, bringing the "smart-menu-items-group" content into view for the user. Suitable for menu navigation or directing users to targeted groups within a menu structure.
Arguments
idstring
The id or numeric path of a page (smart-menu-items-group).
Invoke the changePage method.
const listmenu = document.querySelector('smart-list-menu'); listmenu.changePage("0.0");
checkItem( item: HTMLElement | string): void
Marks an item as checked, indicating that it has been selected or completed. This action typically updates the item's status property (e.g., `checked: true`) within the JSON data.
Arguments
itemHTMLElement | string
smart-menu-item/smart-menu-items-group (or its id or numeric path).
Invoke the checkItem method.
const listmenu = document.querySelector('smart-list-menu'); listmenu.checkItem("0.0");
getItem( id: string): HTMLElement
Retrieves a specific item using either its unique identifier (ID) or a numeric path that locates the item within a hierarchical structure.
Arguments
idstring
The id or numeric path of an item
ReturnsHTMLElement
Invoke the getItem method.
const listmenu = document.querySelector('smart-list-menu'); const result = listmenu.getItem("0.0");
maximize(): void
Expands the List Menu to its maximum available size, displaying all menu items for full visibility and easier selection.
Invoke the maximize method.
const listmenu = document.querySelector('smart-list-menu'); listmenu.maximize();
minimize(): void
Collapses the List Menu to save screen space. When minimized, the full menu is hidden and replaced with a single icon, allowing users to expand the menu again if needed. This improves the user interface by providing a cleaner, less cluttered appearance while maintaining quick access to menu options.
Invoke the minimize method.
const listmenu = document.querySelector('smart-list-menu'); listmenu.minimize();
removeItem( item: HTMLElement | string): void
Removes a specified item from the collection or list. If the item exists, it is deleted; otherwise, no changes are made. This operation typically identifies the item by its unique key, index, or value.
Arguments
itemHTMLElement | string
The smart-menu-item/smart-menu-items-group (or its id or numeric path) to remove.
Invoke the removeItem method.
const listmenu = document.querySelector('smart-list-menu'); listmenu.removeItem("0.0");
uncheckItem( item: HTMLElement | string): void
Removes the checkmark from a selected item, resetting its state to unchecked or unselected. This action is typically used to indicate that the item is not active, chosen, or included in a selection.
Arguments
itemHTMLElement | string
smart-menu-item/smart-menu-items-group (or its id or numeric path).
Invoke the uncheckItem method.
const listmenu = document.querySelector('smart-list-menu'); listmenu.uncheckItem("0.0");
CSS Variables
--smart-list-menu-default-widthvar()
Default value
"var(--smart-box-width)"smartListMenu default width
--smart-list-menu-default-heightvar()
Default value
"var(--smart-box-height)"smartListMenu default height
--smart-list-menu-filter-input-vertical-offsetvar()
Default value
"5px"Defines vertical offset of the ListMenu's filter input.
--smart-list-menu-filter-input-horizontal-offsetvar()
Default value
"5px"Defines horizontal offset of the ListMenu's filter input.
ListItem
Defines a list item for ListBox, ComboBox, DropDownList.
Selector
smart-list-item
Properties
Properties
alternationIndexnumber
Default value
-1colorstring
Default value
""displayMode"plain" | "checkBox" | "radioButton"
Default value
"plain"groupedboolean
Default value
false<smart-list-item grouped></smart-list-item>
selectedboolean
Default value
false<smart-list-item selected></smart-list-item>
valuestring
Default value
""labelstring
Default value
""detailsstring
Default value
""groupstring
Default value
""hiddenboolean
Default value
false<smart-list-item hidden></smart-list-item>
readonlyboolean
Default value
false<smart-list-item readonly></smart-list-item>
ListItemsGroup
Defines a group of list items.
Selector
smart-list-items-group
Properties
Properties
labelstring