Registry / web-framework / streamlit-extras

streamlit-extras

JSON →
library1.6.0pypypi✓ verified 85d ago

Streamlit Extras is a community-driven collection of useful Streamlit components and utilities designed to extend Streamlit's core functionality. It provides a wide range of 'extras' for common UI patterns, interactivity, and backend integrations that are not natively available in Streamlit. The library is actively maintained with frequent minor releases adding new features and fixing bugs, currently at version 1.4.1.

pip install streamlit-extras
INSTALL
IMPORT
SIG · STREAMLIT-EXTRAS
S
streamlit-extras
web-frameworkpythonv1.6.0
Install
21.0s avg
Import
1847ms
Disk
528MB
Pass rate
9/ 10
Env Coverage9 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 18.23s
py 3.11
✓ —
✓ 16.8s
py 3.12
✓ —
✓ 16.48s
py 3.13
✓ —
✓ 16.93s
py 3.9
✕ build_error
✓ 36.45s
528MB installed
● package 528MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

stylable_container
from streamlit_extras.stylable_container import stylable_container
no_footer
from streamlit_extras.no_footer import no_footer
st_theme
This extra is deprecated; consider using native Streamlit theme options or custom CSS.
from streamlit_extras.st_theme import st_theme
The `st_theme` extra was deprecated in v0.7.5. Use Streamlit's native `st.set_page_config(layout='wide', initial_sidebar_state='expanded')` or custom CSS for theming.

This quickstart demonstrates how to use `stylable_container` to apply custom CSS to a section of your Streamlit app, how to add a `badge`, and how to use `no_footer` to remove the default Streamlit footer. Many other extras follow a similar import and usage pattern.

import streamlit as st from streamlit_extras.stylable_container import stylable_container from streamlit_extras.no_footer import no_footer from streamlit_extras.badges import badge st.set_page_config(layout="centered") st.title("Streamlit Extras Quickstart") with stylable_container( key="my_stylable_container", css_styles=""" { border: 2px solid #4CAF50; border-radius: 10px; padding: 15px; margin-bottom: 20px; } """ ): st.subheader("A Stylable Section") st.write("This content is wrapped in a container with custom CSS.") st.button("Hello from inside!") badge(type="info", text="Powered by Streamlit Extras") # Example of removing Streamlit's default footer no_footer()
Debug
Known issues
breakingVersion 1.0.0 introduced a significant repository re-architecture to support Streamlit Custom Components v2 (CCv2). While many existing extras might still function, users who built custom components or heavily integrated with `streamlit-extras` internals prior to v1.0.0 may need to update their code.
fix
Review the official `streamlit-extras` documentation and examples for v1.0.0 and later. Test your application thoroughly and adapt custom components to the new architecture if necessary.
affects: >=1.0.0
deprecatedThe `st_theme` extra was deprecated. Streamlit now offers robust native theming options.
fix
Instead of `from streamlit_extras.st_theme import st_theme`, use Streamlit's native `st.set_page_config(layout='wide', initial_sidebar_state='expanded', theme='dark')` and custom CSS via `st.markdown` or `stylable_container` for fine-grained control.
affects: >=0.7.5
gotchaEach extra often has specific usage patterns and, in some cases, implicit dependencies. Not all extras are suitable for all Streamlit deployment environments (e.g., some might rely on specific browser features or client-side JavaScript that could be limited in certain embedded contexts).
fix
Always consult the documentation or example app (`extras.streamlit.app`) for the specific extra you intend to use. Pay attention to any installation prerequisites or known limitations mentioned for individual extras. Test extras in your target deployment environment.
affects: All versions
gotchaDue to the community-driven nature, new extras are added frequently, and existing ones may evolve. The API surface can be dynamic.
fix
Pin `streamlit-extras` to a specific minor version in your `requirements.txt` (e.g., `streamlit-extras~=1.4.0`) to prevent unexpected changes when updating. Regularly check the GitHub releases and documentation for updates to extras you rely on.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'streamlit_extras'
The `streamlit-extras` library is not installed in your current Python environment.
fix
pip install streamlit-extras
AttributeError: module 'streamlit_extras' has no attribute 'st_toggle_switch'
You are attempting to import a specific extra's function directly from the top-level `streamlit_extras` package instead of its specific submodule.
fix
from streamlit_extras.st_toggle_switch import st_toggle_switch
TypeError: st_toggle_switch() missing 1 required positional argument: 'label'
The `st_toggle_switch` function, like most Streamlit components, requires a `label` argument that was not provided.
fix
st_toggle_switch(label="My Toggle Switch")
Upgrade
Version history
1.6.0latest on PyPI · released May 15, 2026
Audit
Dependencies
streamlitrequiredstreamlit-extras provides extensions for Streamlit applications and requires Streamlit to function.
Agent activity
6 hits · last 30 days
node
6
Resources
streamlit-extras — pip install streamlit-extras · libregistry