lib/streamlit/.agents/skills/developing-with-streamlit/references/third-party-components.md
Extend Streamlit with third-party custom components from the community.
Custom components are standalone Python libraries that add features not in Streamlit's core API. They're built by the community and can be installed like any Python package.
Install using the PyPI package name (not the repo name—they can differ):
uv add <pypi-package-name>
Then import according to the component's documentation. The import name often differs from the package name too.
Components are not maintained by Streamlit. Before adopting:
Custom components can break when Streamlit updates, so prefer core features when possible.
Text input that fires on every keystroke instead of waiting for enter/blur. Useful for live search.
uv add streamlit-keyup
from st_keyup import st_keyup
query = st_keyup("Search", debounce=300) # 300ms debounce
filtered = df[df["name"].str.contains(query, case=False)]
st.dataframe(filtered)
Official replacement for st.bokeh_chart (removed from Streamlit API). Maintained by Streamlit.
uv add streamlit-bokeh
from bokeh.plotting import figure
from streamlit_bokeh import streamlit_bokeh
p = figure(title="Simple Line", x_axis_label="x", y_axis_label="y")
p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=2)
streamlit_bokeh(p)
Interactive dataframes with sorting, filtering, cell editing, grouping, and pivoting. Use when you need customization beyond what st.dataframe and st.data_editor offer.
uv add streamlit-aggrid
from st_aggrid import AgGrid
AgGrid(df, editable=True, filter=True)
When to use aggrid over st.dataframe:
Interactive maps powered by Folium.
uv add streamlit-folium
import folium
from streamlit_folium import st_folium
m = folium.Map(location=[37.7749, -122.4194], zoom_start=12)
st_folium(m, width=700)
Interactive pivot tables with drag-and-drop dimensions, aggregation, and drill-down. Maintained by Streamlit.
uv add streamlit-pivot
import pandas as pd
from streamlit_pivot import st_pivot_table
df = pd.read_csv("sales.csv")
result = st_pivot_table(
df,
key="my_pivot",
rows=["Region"],
columns=["Year"],
values=["Revenue"],
aggregation={"Revenue": "sum"},
show_totals=True,
)
A collection of community utilities. Cherry-pick what you need.
uv add streamlit-extras
from streamlit_extras.pagination import pagination
page = pagination(num_pages=10, default=1, key="my_pages")
st.write(f"Current page: {page}")
from annotated_text import annotated_text
annotated_text(
"This ",
("is", "verb", "#8ef"),
" some ",
("annotated", "adj", "#faa"),
("text", "noun", "#afa"),
)
Browse the custom component gallery: https://streamlit.io/components
Filter by category, popularity, and recency to find custom components for your use case.