A text label for annotating forms or interfaces.



import toga

label = toga.Label("Hello world")


  • Winforms does not support an alignment value of JUSTIFIED. If this alignment value is used, the label will default to left alignment.


class toga.Label(text, id=None, style=None)

Bases: Widget

Create a new text label.

  • text (str) – Text of the label.

  • id – The ID for the widget.

  • style – A style object. If no style is provided, a default style will be applied to the widget.


No-op; Label cannot accept input focus

property text: str

The text displayed by the label.

None, and the Unicode codepoint U+200B (ZERO WIDTH SPACE), will be interpreted and returned as an empty string. Any other object will be converted to a string using str().