UI
text
The 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.
Parameters
markdown_str
(str): The string containing text or Markdown to be rendered.size
(float): (Optional) The width of the component in a row. Defaults to1.0
(full row). See the Layout Guide for details.
Returns
str
containing the inputmarkdown_str
.
Usage Example
Here’s an example of how to use the text
function:
Markdown Support
The text
function supports the full range of Markdown syntax, including:
- Headers:
#
for H1,##
for H2, and so on. - Emphasis:
*italic*
,**bold**
,~~strikethrough~~
. - Lists:
- Unordered:
- Item 1
,- Item 2
- Ordered:
1. Item 1
,2. Item 2
- Unordered:
- Links:
[Link text](https://example.com)
- Code blocks:
- And more!
Was this page helpful?