Text

TextBlock

class pinout.components.text.TextBlock(content, line_height=None, **kwargs)

Bases: pinout.core.Group

Multiline text component.

The TextBlock accepts either a string or list for content. Each list entry is presented as a line of text. Where a string is provided, it is converted to a list by splitting on new-line characters (’\n’) and stripping whitespace from start and end of each line created.

Note

pinout cannot detect text character size! Consequently care should be taken to ensure text does not render outside expected boundaries.

Parameters
  • content (String or List) – Text to be displayed

  • line_height (int, optional) – Distance between lines, defaults to None