dash_mp_components.Dropdown¶
- class dash_mp_components.Dropdown(children: str | int | float | Component | None | Sequence[str | int | float | Component | None] = None, id: str | dict | None = None, className: str | None = None, triggerLabel: str | None = None, triggerClassName: str | None = None, triggerIcon: str | None = None, items: Sequence[str] | None = None, isArrowless: bool | None = None, isUp: bool | None = None, isRight: bool | None = None, closeOnSelection: bool | None = None, **kwargs)[source]¶
Bases:
ComponentA Dropdown component. Generic dropdown menu that can render arbitrary items for display and navigation purposes only (i.e. not for selecting options or performing actions that are not links)
Keyword arguments:
- children (a list of or a singular dash component, string or number; optional):
Use the children prop to set the dropdown items. This should usually be a list of <div> components with the class “dropdown-item”. The content of each item can be anything from simple text to a component.
- id (string; optional):
The ID used to identify this component in Dash callbacks.
- className (string; optional):
Class name(s) to append to the component’s default class (dropdown).
- closeOnSelection (boolean; optional):
Set to False to keep the menu open when an item is clicked @default True.
- isArrowless (boolean; optional):
Set to True to remove the arrow to the right of the trigger label.
- isRight (boolean; optional):
Set to True to align the dropdown menu with the right of the trigger.
- isUp (boolean; optional):
Set to True to make the dropdown menu open upwards.
- items (list of strings; optional):
List of strings to display inside the dropdown menu. Omit this and use the children prop instead if you want supply components as dropdown items.
- triggerClassName (string; optional):
Class name(s) to apply to button that opens the dropdown menu @default ‘button’.
- triggerIcon (string; optional):
Class name(s) for the icon to display to the left of the trigger label (optional).
- triggerLabel (string; optional):
Text to display in the button that triggers the dropdown to open.
- __init__(children: str | int | float | Component | None | Sequence[str | int | float | Component | None] = None, id: str | dict | None = None, className: str | None = None, triggerLabel: str | None = None, triggerClassName: str | None = None, triggerIcon: str | None = None, items: Sequence[str] | None = None, isArrowless: bool | None = None, isUp: bool | None = None, isRight: bool | None = None, closeOnSelection: bool | None = None, **kwargs)¶
Methods
__init__([children, id, className, ...])to_plotly_json()Attributes
REQUIREDUNDEFINEDavailable_wildcard_properties