crystal_toolkit.helpers.layouts module — Crystal Toolkit documentation

# crystal_toolkit.helpers.layouts module

class crystal_toolkit.helpers.layouts.Block(*args, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.Box(*args, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.Button(*args, kind=None, size='normal', **kwargs)

  Bases: `Button`

class crystal_toolkit.helpers.layouts.Column(*args, size=None, offset=None, narrow=False, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.Columns(*args, desktop_only=False, centered=False, gapless=False, multiline=False, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.Container(*args, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.Control(*args, **kwargs)

  Bases: `Div`

  Control tag to wrap form elements, see https://bulma.io/documentation/form/general/

class crystal_toolkit.helpers.layouts.Error(*args, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.Field(*args, addons=False, grouped=False, grouped_multiline=False, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.Footer(*args, **kwargs)

  Bases: `Footer`

class crystal_toolkit.helpers.layouts.H1(*args, subtitle=False, **kwargs)

  Bases: `H1`

class crystal_toolkit.helpers.layouts.H2(*args, subtitle=False, **kwargs)

  Bases: `H2`

class crystal_toolkit.helpers.layouts.H3(*args, subtitle=False, **kwargs)

  Bases: `H3`

class crystal_toolkit.helpers.layouts.H4(*args, subtitle=False, **kwargs)

  Bases: `H4`

class crystal_toolkit.helpers.layouts.H5(*args, subtitle=False, **kwargs)

  Bases: `H5`

class crystal_toolkit.helpers.layouts.H6(*args, subtitle=False, **kwargs)

  Bases: `H6`

class crystal_toolkit.helpers.layouts.Icon(kind='download', fill='s', *args, **kwargs)

  Bases: `Span`

class crystal_toolkit.helpers.layouts.Label(*args, **kwargs)

  Bases: `Label`

class crystal_toolkit.helpers.layouts.Loading(*args, **kwargs)

  Bases: `Loading`

class crystal_toolkit.helpers.layouts.MessageBody(*args, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.MessageContainer(*args, kind='warning', size='normal', **kwargs)

  Bases: `Article`

class crystal_toolkit.helpers.layouts.MessageHeader(*args, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.Modal(children=None, id=None, active=False, **kwargs)

  Bases: `Div`

crystal_toolkit.helpers.layouts.PRIMARY_COLOR = 'hsl(171, 100%, 41%)'

  Helper methods to make working with Bulma classes easier.

class crystal_toolkit.helpers.layouts.Reveal(children=None, id=None, summary_id=None, title=None, **kwargs)

  Bases: `Details`

class crystal_toolkit.helpers.layouts.Section(*args, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.Spinner(*args, **kwargs)

  Bases: `Button`

class crystal_toolkit.helpers.layouts.Tag(tag, tag_type='primary', tag_addon=None, tag_addon_type='primary', size='normal', *args, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.TagContainer(tags: list[crystal_toolkit.helpers.layouts.Tag], *args, **kwargs)

  Bases: `Div`

class crystal_toolkit.helpers.layouts.Textarea(*args, **kwargs)

  Bases: `Textarea`

crystal_toolkit.helpers.layouts.add_label_help(input, label, help)

  Combine an input, label, and tooltip text into a single consistent component.

crystal_toolkit.helpers.layouts.cite_me(doi: Optional[str] = None, manual_ref: Optional[str] = None, cite_text: str = 'Cite me') → Div

  Create a button to show users how to cite a particular resource. :param doi: DOI :param manual_ref: If DOI not available :param cite_text: Text to show as button label :return: A button

crystal_toolkit.helpers.layouts.get_breadcrumb(parts)

crystal_toolkit.helpers.layouts.get_data_list(data: dict[str, str])

  Show a formatted table of data items. :param data: dictionary of label, value pairs :return: html.Div

crystal_toolkit.helpers.layouts.get_table(rows: list[list[Any]], header: list[str] | None = None) → html.Table

  Create a HTML table from a list of elements. :param rows: list of list of cell contents :return: html.Table

crystal_toolkit.helpers.layouts.get_tooltip(tooltip_label: Any, tooltip_text: str, underline: bool = True, tooltip_id: str = '', wrapper_class: Optional[str] = None, **kwargs)

  Uses the tooltip component from dash-mp-components to add a tooltip, typically for help text. This component uses react-tooltip under the hood. :param tooltip_label: text or component to display and apply hover behavior to :param tooltip_text: text to show on hover :param tooltip_id: unique id of the tooltip (will generate one if not supplied) :param wrapper_class: class to add to the span that wraps all the returned tooltip components (label + content) :param kwargs: additional props added to Tooltip component. See the components js file in

  > dash-mp-components for a full list of props.

  Returns

    html.Span