text
function allows you to display formatted text or Markdown in your application. It’s perfect for creating titles, headers, paragraphs, and more using the power of Markdown syntax. It also allows you to display mathematical functions with latex syntax (via katex).
markdown_str
(str): The string containing text or Markdown to be rendered.size
(float): (Optional) The width of the component in a row. Defaults to 1.0
(full row). See the Layout Guide for details.str
containing the input markdown_str
.text
function:
text
function supports the full range of Markdown syntax, including:
#
for H1, ##
for H2, and so on.
*italic*
, **bold**
, ~~strikethrough~~
.
- Item 1
, - Item 2
1. Item 1
, 2. Item 2
[Link text](https://example.com)
text("$E=mc^2$")
text("\n\n$$\\int_0^1 x^2 \\, dx = \\frac{1}{3}$$")