streamlit-plotly-events
Plotly chart component for Streamlit that also allows for events to bubble back up to Streamlit.
What it is and what it does
Streamlit Plotly Events is a Streamlit custom component that bridges Plotly charts with Streamlit's event system. It wraps Plotly figures and exposes click, select (lasso), and hover events, returning a list of dictionaries containing point details (x, y, curve index, point index) that your Streamlit app can react to. This enables interactive workflows where users click or hover on chart elements and your app responds in real time.
The package is lightweight—it depends only on streamlit and plotly—and integrates seamlessly with Streamlit's component API. You pass a Plotly figure to the `plotly_events()` function, optionally configure which events to listen for via kwargs, and receive back the selected point data. The documentation notes that hover events are resource-intensive, suggesting they should be used selectively.
Use it for:
- Build dashboards where clicking a data point filters or highlights related data elsewhere on the page.
- Create exploratory data tools where hovering reveals detailed tooltips or triggers calculations.
- Implement lasso-select workflows to let users select multiple points and export or analyze them.
- Add drill-down interactivity to charts, where clicking a point opens a detail view or nested analysis.
- Prototype interactive scientific or financial visualizations that respond to user selections in real time.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Captures click, select, and hover events from Plotly charts rendered in Streamlit, returning point details back to your app for interactive workflows.
Yes, with conditions. The package solves a real gap—native Streamlit lacks Plotly event capture—and has low install friction. However, maintenance is dormant (last release April 2021); compatibility with current streamlit and plotly versions is unverified, and the license is unclear. Install it for prototyping or internal tools, but evaluate compatibility and licensing before production use.
Install
streamlit-plotly-events on PyPI
pip
pip install streamlit-plotly-eventsuv
uv add streamlit-plotly-eventspoetry
poetry add streamlit-plotly-eventsInstalling streamlit-plotly-events
Before you install
Low friction: pure Python wheel with only streamlit and plotly as runtime dependencies. Maintenance is dormant—last release was 2021-04-26, though the repo remains unarchived and saw a commit as recently as 2024-07-16. No recent activity suggests compatibility issues may accumulate.
License in practice
License treatment is unclear—no SPDX identifier or raw license text is recorded. Before relying on this package in a commercial or copyleft context, verify the actual license from the repository.
Quickstart
pip install streamlit-plotly-events
import plotly.express as px
from streamlit_plotly_events import plotly_events
fig = px.line(x=[1], y=[1])
selected_points = plotly_events(fig)
Requires Python 3.6 or later and both streamlit and plotly to be installed.
Verify before relying
- Compatibility with current versions of streamlit and plotly (last release 2021-04-26, no recent updates).
- Whether hover_event is truly resource-intensive in practice and under what conditions.
- Performance impact when handling large numbers of overlapping points or high-frequency events.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — streamlit, plotly |
| Maintenance | dormant — 1,936 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 112,485/month — #12,369 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: streamlit_plotly_events-0.0.6-py3-none-any.whl
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
altexAltex wraps Altair to provide a simple,…
permissive · top 15,000 on PyPI
streamlit-image-coordinatesA Streamlit component that displays an image…
permissive · top 15,000 on PyPI
streamlit-echartsRenders interactive ECharts visualizations in…
permissive · top 15,000 on PyPI
streamlit-feedbackAdds a user feedback widget to Streamlit apps…
permissive · top 15,000 on PyPI
streamlit-foliumRenders interactive Folium maps in Streamlit…
unclear · top 15,000 on PyPI
plotlyPlotly is an interactive, browser-based…
permissive · top 1,000 on PyPI
streamlit-javascriptExecutes arbitrary JavaScript code from within…
permissive · top 15,000 on PyPI
chart-studioProvides utilities to interface with Plotly's…
permissive · top 15,000 on PyPI
streamlit-sortablesStreamlit Sortables adds drag-and-drop sortable…
permissive · top 15,000 on PyPI
streamlit-camera-input-liveProvides a Streamlit component that captures…
unclear · top 15,000 on PyPI