$ show arnaudmiribel/streamlit-extras
This repository is a community-driven collection of Streamlit 'extras' — custom components and utilities that extend Streamlit's functionality. It is a Python library (package `streamlit-extras`) that provides over 40 self-contained subpackages, each implementing a specific UI widget, layout helper, or data exploration tool. The architecture is modular: each extra is a subpackage under `src/streamlit_extras/` with a standardized metadata convention (`__title__`, `__desc__`, etc.) and a central `@extra` decorator for registration. Some extras are pure Python wrappers around Streamlit's native APIs (e.g., `grid`, `stateful_button`, `stoggle`), while others are full Custom Components v2 (CCv2) with React/TypeScript frontends built with Vite (e.g., `three_viewer`, `json_editor`, `sigma_graph`). The build system uses Hatch with a custom build hook to compile React frontends during wheel packaging. The gallery app (`gallery/streamlit_app.py`) serves as a demo and documentation explorer. The codebase is well-organized but has several deprecated extras that rely on private Streamlit APIs, and test coverage is limited to metadata validation. Overall, it is a solid, actively maintained library with reusable patterns for Streamlit component development.
The LLM identified 3 files worth highlighting for reuse:
Implements a grid layout by wrapping Streamlit's columns API with automatic row creation and round-robin spec cycling. Self-contained and reusable for any Streamlit app needing a grid.
Hatch build hook that compiles React frontends during wheel packaging. Demonstrates a pattern for integrating npm-based builds into Python packaging, reusable for any Streamlit component library.
Provides a helper function to register Streamlit custom components from asset files (HTML/CSS/JS). Reusable for any component that uses static assets instead of a full React build.