Horizontal Separator Line?

Is there a command to draw a horizotnal black line to separate parts of the app?
Or, is there a way to automatically put horizontal black lines between container objects.

You can do this with html components.
Something like

components.html("""<hr style="height:10px;border:none;color:#333;background-color:#333;" /> """)

Similarly, if color customization is not essential, without the need for components you can go with plain Markdown

import streamlit as st

text = '''
I am above line


I am below line

1 Like

I get an error “components not defined”.
I also tried it with st.html and my_container.html and got an error (module ‘streamlit’ has no attribute ‘html’)

Ah yes, you have to import the streamlit components bit…

import streamlit.components.v1 as components
1 Like