dash_mp_components.GlobalSearchBar

class dash_mp_components.GlobalSearchBar(redirectRoute: str | None = None, autocompleteFormulaUrl: str | None = None, apiKey: str | None = None, hidePeriodicTable: bool | None = None, tooltip: str | None = None, placeholder: str | None = None, **kwargs)[source]

Bases: Component

A GlobalSearchBar component. Component for rendering advanced search interfaces for data in an API Renders results in a data table alongside a set of filters that map to properties in the data.

Keyword arguments:

  • apiKey (string; optional):

    API key (if needed) that will be used to hit the autocomplete route.

  • autocompleteFormulaUrl (string; optional):

    Optional URL endpoint for fetching formula autocompletion results e.g. “https://api.materialsproject.org/materials/formula_autocomplete/”.

  • hidePeriodicTable (boolean; optional):

    Boolean flag for showing/hiding the periodic table on initial load.

  • placeholder (string; optional):

    Optionally add a string of text to show up in the top-level search bar.

  • redirectRoute (string; optional):

    The route (minus the query params) that submissions should redirect to.

  • tooltip (string; optional):

    Optionally add a help icon with a tooltip in the search bar This should be used to provide instructions on how to use the search bar e.g. ‘Type in a comma-separated list of element symbols (e.g. Ga, N), a chemical formula (e.g. C3N), or a material id (e.g. mp-10152). You can also click elements on the periodic table to add them to your search.’.

__init__(redirectRoute: str | None = None, autocompleteFormulaUrl: str | None = None, apiKey: str | None = None, hidePeriodicTable: bool | None = None, tooltip: str | None = None, placeholder: str | None = None, **kwargs)

Methods

__init__([redirectRoute, ...])

to_plotly_json()

Attributes

REQUIRED

UNDEFINED

available_wildcard_properties