Write fixed-width and preformatted text.

Function signature[source]

st.text(body, *, help=None)

Parameters

body (str)

The string to display.

help (str)

An optional tooltip that gets displayed next to the text.

Example

import streamlit as st

st.text('This is some text.')
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.