Custom Components
Components are third-party Python modules that extend what's possible with Streamlit.
How to use a Component
Components are super easy to use:
-
Start by finding the Component you'd like to use. Two great resources for this are:
- The Component gallery
- This thread, by Fanilo A. from our forums.
-
Install the Component using your favorite Python package manager. This step and all following steps are described in your component's instructions.
For example, to use the fantastic AgGrid Component, you first install it with:
pip install streamlit-aggrid
-
In your Python code, import the Component as described in its instructions. For AgGrid, this step is:
from st_aggrid import AgGrid
-
...now you're ready to use it! For AgGrid, that's:
AgGrid(my_dataframe)
Making your own Component
If you're interested in making your own component, check out the following resources:
Alternatively, if you prefer to learn using videos, our engineer Tim Conkling has put together some amazing tutorials:
Video tutorial, part 1
Video tutorial, part 2
Still have questions?
Our forums are full of helpful information and Streamlit experts.