Dropdown
The Dropdown component displays a menu or contextual content when opened, positioned around a trigger element. It can be opened by clicking or hovering, and closes automatically according to selected parameters (closeOnClick, openOnHover, etc.).
It’s designed to offer great flexibility: configurable positioning, customizable appearance, and a customizable activator for total trigger control.
A simple example of a click-triggered dropdown, with default content displayed below the trigger.
Demonstrate how to use the ref prop to directly manipulate or target the dropdown DOM element.
Allows you to dynamically position the menu in relation to its trigger (top, center, bottom). Useful for managing space constraints in the UI.
The menu closes automatically when an item inside is clicked. Handy for action lists or quick links.
The dropdown opens automatically when the trigger is hovered over, without the need to click. Ideal for secondary menus or navigation bars.
ModelDropdownProps
The ModelDropdownProps
interface groups the properties automatically passed to the activator. It provides a clean way of typifying a dropdown’s custom trigger, giving access to the opening state and other useful options for dynamically adapting the trigger’s appearance or behavior.
Combine Dropdown with an Appbar or Popover for improved navigation ergonomics.