Releases: ObservedObserver/streamlit-shadcn-ui
Release list
Streamlit Shadcn UI 1.1.0
Streamlit Shadcn UI 1.1.0
Streamlit Shadcn UI 1.1.0 introduces ui.elements, a V2-only composition API
for building a typed nested shadcn React tree from Python. Existing 1.0 APIs
remain available without signature changes.
Highlights
- One
ui.elementsblock produces one Components V2 mount, one Shadow DOM,
and one React root. stack,grid, and typed Card slots provide structural composition.- Content nodes cover headings, text, code, badges, separators, progress,
images, and link buttons. - Stateful nodes cover input, textarea, checkbox, switch, slider,
radio-group, and select values. - Buttons emit transient actions without persisting or replaying stale clicks.
- Explicit keys preserve node identity across insertion, removal, and
reordering. - Changed Python defaults reset only the affected node.
- Value changes and actions are dispatched to typed callbacks in sequence.
Example
import streamlit as st
import streamlit_shadcn_ui as ui
with ui.elements(key="account-settings") as el:
with el.card(key="profile"):
with el.card_header():
el.heading("Profile")
el.text("Manage your account details.", variant="muted")
with el.card_content():
email = el.input(
"Email",
value="ada@example.com",
key="email",
)
with el.card_footer():
save = el.button("Save", key="save", stretch=True)
st.write(email.value, save.clicked)Compatibility and boundaries
- Python 3.10 or newer and Streamlit 1.60 or newer are required.
- Native Streamlit elements and third-party components cannot be inserted as
React descendants of an Elements tree. - Stateful and action nodes require explicit keys. The root key is required.
- Action nodes fail closed inside
st.form; state-only trees retain normal
deferred form submission behavior. - The serialized tree is strictly allowlisted and capped at 1,000 nodes,
depth 32, and a 2 MiB protocol envelope. - Arbitrary JSX, HTML, CSS classes, and custom React components are not part
of the 1.1.0 contract.
Acceptance case
Run the documentation app:
streamlit run Home.py \
--server.address=127.0.0.1 \
--browser.serverAddress=127.0.0.1Then open http://127.0.0.1:8501/Elements or choose
Use Cases > V2 Elements in the sidebar. The existing product homepage
remains the default route.
The acceptance case contains two shadcn homepage cards in one React root and
exercises responsive layout, dynamic keyed children, aggregate values,
ordered callbacks, transient actions, and rerun reconciliation.
Release verification
- 77 Python contract and application tests passed.
- 69 frontend unit tests and the production frontend build passed with the
locked Node 22.20.0 and pnpm 11.18.0 toolchain. - The Elements acceptance suite passed all 9 Chromium, Firefox, and WebKit
scenarios. - Fresh wheel and sdist installs each rendered all 35 V2 component kinds,
including one nested Elements tree, with no iframe or browser diagnostic. - The wheel installed and imported
ui.elementson Python 3.10, 3.11, 3.12,
3.13, and 3.14 with Streamlit 1.61.1. - The fail-closed archive verifier and
twine checkpassed for both artifacts.
Release candidate SHA-256 checksums:
8df084b899cbb433565f9bb4a4b7611e0a8bab4e4fa4786a9520829a7e2884f7 streamlit_shadcn_ui-1.1.0-py3-none-any.whl
dab11e8c36eb238e1977c5a667bf122b0233c6f978db14b873740295eae6d88f streamlit_shadcn_ui-1.1.0.tar.gz
Upgrade
No migration is required for existing 1.0 applications. Import the package
root and opt into the new composition API only where a true nested React tree
is useful:
import streamlit_shadcn_ui as ui1.0.1
Streamlit Shadcn UI 1.0.1
Patch release focused on an honest, reproducible public-API showcase.
Fixes
- Rebuilt the homepage card wall entirely from public
ui.*APIs and standard Streamlit layout primitives - Added a regression check that rejects private homepage component calls
- Fixed
width="stretch"for Button and LinkButton for every package user - Made Tailwind CSS release builds deterministic by scanning only explicit frontend sources
- Updated release verification so all package manifests must share a stable
1.0.xversion
Verification
- 63 frontend tests and 62 Python tests
- Reproducible Node 22.20 / pnpm 11.18 build with identical consecutive SHA-256 hashes
- Verified wheel and sdist contents against checked-in V2 assets
- Installed and imported the public PyPI wheel in an isolated environment
pip install streamlit-shadcn-ui==1.0.11.0.0
Streamlit Shadcn UI 1.0.0
Version 1.0 is a complete migration to Streamlit Components V2 and the first V2-only release of Streamlit Shadcn UI.
Highlights
- Rebuilt all 35 public components with checked-in shadcn/ui source backed by Base UI
- Migrated to Streamlit Components V2, React 19, and Tailwind CSS 4
- Removed component iframes entirely
- Added isolated Shadow DOM styling with native light and dark theme support
- Fixed clipping and stacking for Select, Dropdown Menu, Popover, Hover Card, Date Picker, and Alert Dialog using the browser top layer
- Added typed Python return values and documented callbacks
- Made
keyoptional for ordinary component calls - Added a new documentation homepage, Getting Started guide, Playground, and complete V2 API examples
Breaking changes
Version 1.0 no longer ships the V1 iframe implementation or the streamlit_shadcn_ui.v1 namespace.
Notable API changes include:
button(text=...)→button(label=...)- Grouped V1 checkboxes → composition of scalar
checkbox()calls - CamelCase arguments such as
totalPagesandmaxHeight→ snake_case with ui.card(...)and experimentalui.element()trees have been removed- Components now return public values directly instead of exposing internal transport dictionaries through
st.session_state
Applications that cannot migrate yet should remain on streamlit-shadcn-ui==0.1.19.
Requirements
- Python 3.10 or newer
- Streamlit 1.60 or newer
pip install streamlit-shadcn-ui==1.0.00.1.19
What's Changed
- Fix select/date picker bug
- Lots of new components
New Contributors
- @BHznJNs made their first contribution in #29
- @mankasto made their first contribution in #35
- @FengJingting made their first contribution in #38
Full Changelog: 0.1.18...0.1.19
0.1.18
Update
- date time range picker
Now you can select date range.
import streamlit as st
import streamlit_shadcn_ui as UI
# pick single date
dt = ui.date_picker(key="date_picker", mode="single", label="Date Picker")
st.write("Date Value:", dt)
# pick date range
dt2 = ui.date_picker(key="date_picker2", mode="range", label="Date Picker")
st.write("Date Range:", dt2)Full Changelog: 0.1.17...0.1.18
0.1.17
- hot fix for component default value
Full Changelog: 0.1.13...0.1.17
0.1.13
fix init_state bug
Full Changelog: 0.1.12...0.1.13
0.1.12
updates
- fix: button state reset (issues occurs when there is more than two ui.button)
- element: more clean and simple API (without using add_child in with statement)
0.1.11
update
- The powerful
ui.elementfor renderer any combination of components like your are writing react.
with ui.element("card", key="base_ele") as card:
with ui.element("card", key="base_ele2") as card2:
card2.add_child(ui.element("input", key="nst2_input"))
card2.add_child(ui.element("button", key="nst2_btn", text="Nest Submmit", variant="outline"))
card.add_child(card2)
card.add_child(ui.element("button", key="nst_btn", text="Hello World"))Full Changelog: 0.1.10...0.1.1