.. role:: clio-optional
   :class: clio-flag clio-flag-optional

.. role:: clio-static
   :class: clio-flag clio-flag-static


############
DropdownMenu
############

.. js:class:: ui.dropdown.DropdownMenu

   A customizable dropdown menu component with flexible positioning and keyboard navigation.
   
   Provides a trigger element that opens a floating panel with menu content, supporting various positioning options and accessibility features.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~ui.dropdown.DropdownMenu.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~ui.dropdown.DropdownMenu.shadowRootOptions`
   * :js:data:`~ui.dropdown.DropdownMenu.styles`
   * :js:data:`~ui.dropdown.DropdownMenu.disabled`
   * :js:data:`~ui.dropdown.DropdownMenu.focusableSelector`
   * :js:data:`~ui.dropdown.DropdownMenu.position`
   * :js:data:`~ui.dropdown.DropdownMenu.preventCloseOnClickInside`
   * :js:data:`~ui.dropdown.DropdownMenu.anchor`
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~ui.dropdown.DropdownMenu.dropdownPositionalStyles`
   * :js:func:`~ui.dropdown.DropdownMenu.focusableDropdownChildren`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~ui.dropdown.DropdownMenu.toggleDropdown`
   * :js:meth:`~ui.dropdown.DropdownMenu.render`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: ui.dropdown.DropdownMenu.constructor

      .. rst-class:: sig-pretty-signature
      
         | DropdownMenu(): :js:class:`DropdownMenu <ui.dropdown.DropdownMenu>`
      
      **Returns**\ : :js:class:`DropdownMenu <ui.dropdown.DropdownMenu>`
      



.. rst-class:: kind-group kind-properties

.. rubric:: Properties
   :class: kind-group-title


.. js:data:: ui.dropdown.DropdownMenu.shadowRootOptions

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | shadowRootOptions: { delegatesFocus: *boolean* }
      
      Options used when calling ``attachShadow``\ . Set this property to customize the options for the shadowRoot; for example, to create a closed shadowRoot: ``{mode: 'closed'}``\ .
      
      Note, these options are used in ``createRenderRoot``\ . If this method is customized, options should be respected if possible.
      



.. js:data:: ui.dropdown.DropdownMenu.styles

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | styles: *CSSResult*\ []
      
      Array of styles to apply to the element. The styles should be defined using the ? tag function, via constructible stylesheets, or imported from native CSS module scripts.
      
      Note on Content Security Policy:
      
      Element styles are implemented with ``<style>`` tags when the browser doesn't support adopted StyleSheets. To use such ``<style>`` tags with the style-src CSP directive, the style-src value must either include 'unsafe-inline' or ``nonce-<base64-value>`` with ``<base64-value>`` replaced be a server-generated nonce.
      
      To provide a nonce to use on generated ``<style>`` elements, set ``window.litNonce`` to a server-generated nonce in your page's HTML, before loading application code:
      
      .. code-block:: html
      
         <script>
           // Generated and unique per request:
           window.litNonce = 'a1b2c3d4';
         </script>
      



.. js:data:: ui.dropdown.DropdownMenu.disabled

      .. rst-class:: sig-pretty-signature
      
         | disabled: *boolean*
      
      Whether the dropdown is disabled and non-interactive.
      



.. js:data:: ui.dropdown.DropdownMenu.focusableSelector

      .. rst-class:: sig-pretty-signature
      
         | focusableSelector: *string*
      
      CSS selector for elements that should be focusable within the dropdown.
      
      By default this includes <a>, <button>, <input>, <textarea>, <select>, <details> elements, as well as elements with a non-negative tabindex attribute. CSS selector for elements that should be focusable within the dropdown.
      



.. js:data:: ui.dropdown.DropdownMenu.position

      .. rst-class:: sig-pretty-signature
      
         | position: (*"left"* | *"right"* | *"top"* | *"bottom"*\ )
      
      Position of the dropdown relative to the trigger element.
      



.. js:data:: ui.dropdown.DropdownMenu.preventCloseOnClickInside

      .. rst-class:: sig-pretty-signature
      
         | preventCloseOnClickInside: *boolean*
      
      Prevents the dropdown from closing when clicking inside the dropdown panel.
      



.. js:data:: ui.dropdown.DropdownMenu.anchor

      .. rst-class:: clio-flags
      
         :clio-optional:`optional`
      
      .. rst-class:: sig-pretty-signature
      
         | anchor: (*"left"* | *"right"* | *"top"* | *"bottom"*\ )
      
      Anchor point for dropdown alignment relative to the trigger element.
      



.. rst-class:: kind-group kind-accessors

.. rubric:: Accessors
   :class: kind-group-title


.. js:method:: ui.dropdown.DropdownMenu.dropdownPositionalStyles

      .. rst-class:: sig-pretty-signature
      
         | *get* dropdownPositionalStyles(): *StyleInfo*
      
      Returns the positional styles for a dropdown based on the current position. The styles include properties such as 'left', 'right', 'top', 'bottom' and 'margin'.
      
      **Returns**\ : *StyleInfo*
      
      
         Object representing the positional styles for the dropdown
      
      



.. js:method:: ui.dropdown.DropdownMenu.focusableDropdownChildren

      .. rst-class:: sig-pretty-signature
      
         | *get* focusableDropdownChildren(): (*undefined* | *NodeListOf*\ )
      
      Retrieves the focusable children within the dropdown slot element.
      
      **Returns**\ : (*undefined* \| *NodeListOf*\ )
      
      
         A list of HTMLElements representing the focusable children
      
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: ui.dropdown.DropdownMenu.toggleDropdown

      .. rst-class:: sig-pretty-signature
      
         | toggleDropdown(**event**\ : *PointerEvent*\ ): *Promise*
      
      Toggles the dropdown menu visibility based on the current state.
      
      **Parameters**
      
      
         **event**\ : *PointerEvent*
      
      
            The pointer event triggering the dropdown toggle.
      
      
      
      **Returns**\ : *Promise*
      
      
      



.. js:method:: ui.dropdown.DropdownMenu.render

      .. rst-class:: sig-pretty-signature
      
         | render(): *unknown*
      
      Invoked on each update to perform rendering tasks. This method may return any value renderable by lit-html's ``ChildPart`` - typically a ``TemplateResult``\ . Setting properties inside this method will *not* trigger the element to update.
      
      **Returns**\ : *unknown*
      




