Hello,
Simple as that, is there any way to make a text-input’s value not editable by user?
Thamks in advance
Hi @elwyn,
It isn’t possible with the st.text_input
. If your objective is to display text and make it appear visually similar to the text input widget, you could try using st.code
, with the language set to “markdown”, like so:
import streamlit as st
st.code("This is a test", language="markdown")
#1 in the screenshot below is a the editable text input widget.
#2 is the static text displayed with st.code
.
Happy Streamlit-ing!
Snehan
thamks. it does the job!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.