Multiline text using st.text_area()

Hi @Siddhesh-Agarwal, welcome to the Streamlit community!

You can achieve this by using splitlines:

 import streamlit as st


t = st.text_area("Enter multiline text")

if t is not None:
    textsplit = t.splitlines()

    for x in textsplit:
        st.write(x)

Best,
Randy

3 Likes