streamlit-scrollable-textbox
streamlit-scrollable-textbox copied to clipboard
Scrollable textbox component for Streamlit.
Streamlit Scrollable Textbox
This repository contains a custom Streamlit component, that allows users to create scrollable textboxes of a defined height, to display long pieces of text on a Streamlit app while maintaining a desired layout.
To install the component, run the following command:
pip install streamlit-scrollable-textbox
Importing and using the package in your Python project can be done as so:
import streamlit_scrollable_textbox as stx
stx.scrollableTextbox('My very long text.')
The parameters of the scrollableTextbox function are:
- text (str): The text to be displayed. Line breaks and new lines can be added by including "\n" in the string.
- height (int): The height of the scrollable area, in pixels. Default value is 100 px.
- font family (str): The font family of the text to be displayed. Only fonts supported by browsers can be used.
- border (bool): Define whether the scrollable area should have a border or not.
