Align text in "justify" alignment

image

Does streamlit has this option?

Thanks, keep up the awesome work!

Hey @somanyadav

You can use Markdown for it.
Here is a code sample to demonstrate the same -

import streamlit as st

st.markdown('<div style="text-align: center;">Hello World!</div>', unsafe_allow_html=True)
st.markdown('<div style="text-align: left;">Hello World!</div>', unsafe_allow_html=True)
st.markdown('<div style="text-align: right;">Hello World!</div>', unsafe_allow_html=True)
st.markdown('<div style="text-align: justify;">Hello World!</div>', unsafe_allow_html=True)

Happy Streamlit-ing!
Kanak

1 Like

Thanks I got it @Kanak!

1 Like