I have a super long text stream and it needs to only take up an NxM pixel area. It would work just fine if I could put it inside a container that can scroll but I haven’t found a solution yet.
I saw this post but I don’t understand the solution. Is there a better way to get a text area that can scroll?
From what I understand, you could do inspect element for a specific part of the web page and grab the element class for you to apply the CSS styling needed. In this case, once you identified the class, you can add overflow: scroll. Hope this can lead you to the solution as my understanding of this is also quite shallow.
import streamlit as st
from streamlit.components.v1 import html
lorem = (
"""
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nisl nec
vulputate lacinia, nunc nisl aliquam mauris, eget aliquet nisl nisl et nunc.
Sed euismod, nisl nec vulputate lacinia, nunc nisl aliquam mauris, eget aliquet.</p>
"""
* 10
)
html(lorem, height=100, scrolling=True)