
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Sometimes you want a user to make a selection, but you only have a few options.
Using an st.selectbox
component works, but wouldn't it be easier to simply have a few buttons in a row ?
Well, this custom component allows just that !
pip install st_row_buttons
Creating a Button Selection is really easy.
from st_row_buttons import st_row_buttons
selection = st_row_buttons(('option 1', 'option 2', 'option 3'))
You can also use this component as a small top navigation bar.
from st_row_buttons import st_row_buttons
page = st_row_buttons(
# The different pages
('home', 'about', 'docs', 'playground'),
# Enable navbar
nav=True,
# You can pass a formatting function. Here we capitalize the options
format_func=lambda name: name.capitalize(),
)
# Display the right things according to the page
if page == 'home':
st.write('HOMEPAGE')
NOTE
There can only be one navbar per page, as they will be displayed on top of each other.The navbar buttons do not set any URL hashes, and thus the different pages are not bookmarkable, nor can you use the browser history.
Check out this streamlit app for the documentation, as well as a demo.
pypi-AgEIcHlwaS5vcmcCJGE1ZDc3MWY2LWZiZjMtNDM1Yy04YzMxLTAwZjQwNThlNjIwZgACJXsicGVybWlzc2lvbnMiOiAidXNlciIsICJ2ZXJzaW9uIjogMX0AAAYgr88ILL5mY-1H0rgPN5UjLUTt8ggY2ODParisMq71Bnc
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.