Skip to content

text class

Displays a value as a static text.

Methods

__init__()

__init__(
    value="",
    raw=False,
    mode=None,
    format=None,
    width=None,
    id=None,
    properties=None,
    class_name=None,
    hover_text=None,
) -> None

Create a new text element.

Parameters:

Name Type Description Default

value

Any
dynamic

The value displayed as text by this control.

raw

bool

If set to True, the component renders as an HTML <span> element without any default style.

False

mode

str

Define the way the text is processed:

  • "raw": synonym for setting the raw property to True
  • "pre": keeps spaces and new lines
  • "markdown" or "md": basic support for Markdown.
None

format

str

The format to apply to the value.
See below.

None

width

Union[str, int]

The width of the element.

None

id

str

The identifier that is assigned to the rendered HTML component.

None

properties

dict[str, Any]

Bound to a dictionary that contains additional properties for this element.

None

class_name

str
dynamic

The list of CSS class names that are associated with the generated HTML Element.
These class names are added to the default taipy-text class name.

None

hover_text

str
dynamic

The information that is displayed when the user hovers over this element.

None