dash_mp_components.NavbarDropdown¶
- class dash_mp_components.NavbarDropdown(children: str | int | float | Component | None | Sequence[str | int | float | Component | None] = None, className: str | None = None, isArrowless: bool | None = None, isRight: bool | None = None, items: Sequence | None = None, **kwargs)[source]¶
Bases:
ComponentA NavbarDropdown component. Component for including dropdown menus inside a bulma navbar Includes all of the default bulma classes for a navbar-dropdown
Keyword arguments:
- children (a list of or a singular dash component, string or number; optional):
Use the children prop to set the dropdown trigger content This can be simple text or a component The trigger will automatically be wrapped with the “navbar-link” class.
- className (string; optional):
Extra class name applied to top level navbar-item The “navbar-item” and “has-dropdown” classes are added automatically.
- isArrowless (boolean; optional):
Set to True to hide the default angle down arrow created by bulma.
- isRight (boolean; optional):
Set to True to apply bulma’s “is-right” class to the navbar-dropdown This aligns the dropdown menu with the right side of the trigger.
- items (list; optional):
An array of navbar-items to show in the dropdown when hovering over the label. An item can be a link, a menu label, or a divider Each item can support the following properties: – text: string (the text to show in the item) – href: string (the href value for link items, ignored if item is menu label) – isMenuLabel: boolean (sets this item as a label with the “menu-label” class) – isDivider: boolean (sets this item as just a horizontal rule with the “navbar-divider” class) – openInNewTab: boolean (will open link in a new tab, only works if href is a full url) e.g. [ { text: “Materials”, href: “/materials” }, { text: “Molecules”, href: “/molecules” }, { isDivider: True }, { isMenuLabel: True, text: “Other” }, { text: “External Site”, href: “https://externalsite.com”, openInNewTab: True } ].
- __init__(children: str | int | float | Component | None | Sequence[str | int | float | Component | None] = None, className: str | None = None, isArrowless: bool | None = None, isRight: bool | None = None, items: Sequence | None = None, **kwargs)¶
Methods
__init__([children, className, isArrowless, ...])to_plotly_json()Attributes
REQUIREDUNDEFINEDavailable_wildcard_properties