Hello guys,
I just created a way to attach keyboard shortcuts for your Streamlit buttons.
You can see it on Github
it’s easy to install through pip
Example usage:
import streamlit as st
from streamlit_shortcuts import add_keyboard_shortcuts
def delete_callback():
st.write("DELETED!")
st.button("delete", on_click=delete_callback)
add_keyboard_shortcuts({
'Ctrl+Shift+X': 'delete',
})
I noticed it was a recurrent problem and the solutions I found were incomplete, broken and often dirty.
So I hope you find this useful.
5 Likes
andell
December 6, 2023, 9:13pm
43
Hello thank you very much it’s super nice
Ah yes, thanks for the suggestion, I’ll have a look.
1 Like
hustcc
December 19, 2023, 5:21am
44
streamlit-g2: A visualization grammar based on G2 for streamlit. GitHub , Demo
2 Likes
Hi all,
Added Streamlit Chunk File Uploader.
2 Likes
Hi everyone,
Does anyone know how to create draggable buttons? How i can drag and drop a button? I know sac.buttons are really good, but i would love to have this function.
Thanks!!
2 Likes
I forgot to mention it here:
Streamlit PDF Viewer: A streamlit component to render and decorate PDF documents.
You can check it at work with our demo
5 Likes
If this post is inappropriate, please let me know and I will delete it immediately. Recently, there haven’t been any updates to the streamlit component gallery at all. Will the components registered here ever be featured in the component gallery? Despite being described as irregular, how often are updates made?
Hi @GracefulTabby ,
That’s a question @Jessica_Smith may be able to answer
Charly
1 Like
i cant see clearly, i cannot find a way to turn off dark mode in the discuss page
Click on your display photo on the top right > Profile > Preferences > Interface > Dark mode
1 Like
This component implements a selectbox that allows free text input. It is based on React-Select’s ‘Select’ component. Check it out! Feedback appreciated:
This component implements a selectbox that allows free text input. It is based on React-Select’s ‘Select’ component.
Check it out on Github:
1 Like
Streamlit-router allows you to create truly production-level multi-page applications
As part of a series of shared components, I will be sharing a multi-page Streamlit solution that was developed over two years ago. Developing apps with Streamlit is often limited to simple small script applications, but Streamlit-Router allows you to develop large-scale web applications without any performance or engineering scale burden. Streamlit-router provides a very clean syntax and interface for Python web development, making multi-page development very simple.
[20240423141943]
Install
…
3 Likes
New component: Streamlit-Molstar for visualisation and analysis of large-scale molecular data
Hi everyone, as part of a series of shared components, I will share a new component that we integrated Molstar (A modern web-based open-source toolkit for visualisation and analysis of large-scale molecular data.) into Streamlit in a real project a year ago. It can basically meet the visualization needs of proteins, molecules, and other scenarios, making it perfect for building some small research tools in the field of biological sciences. The project address:
Install
pip install streamlit-m…
2 Likes
New Component: Streamlit-antd allows you to easily integrate beautiful Antd components in streamlit
Hi everyone, as a part of a series on sharing components, I will share a solution for using beautiful Antd components in a Streamlit application called Streamlit-antd. It makes our lives easier when developing complex features.
https://ant.design/components/overview
https://github.com/pragmatic-streamlit/streamlit-antd
[20240423141943]
Install
pip install streamlit-antd
Usage
Tabs
from streamlit_antd.tabs import st_antd_tabs
event = st_antd_tabs([{"Label": op} for op in options], key="labs_…
3 Likes
New Component: streamlit-phone-number provides an internationalized mobile phone number Input component
As a part of a series on sharing components, I will share a solution for internationalized mobile phone number Input component:
[image]
import streamlit as st
event = st_phone_number("Phone", placeholder="xxxxxx ", default_country="CN")
st.write(event)
3 Likes
New Component: streamlit-iframe-autoresize allows the embedded subpage to automatically adjust its height
As a part of a series on sharing components, I will share a solution for automatically resize an iframe to fit its content.
https://github.com/pragmatic-streamlit/streamlit-iframe-autoresize
Installation
pip install streamlit-iframe-auto-resize
Usage
import streamlit as st
st.write("## Demo")
st_iframe_autoresize("http://localhost:8502")
3 Likes
New Component: streamlit-embeded allows easy embedding of an HTML snippet and automatically adjusts the content height
As a part of a series on sharing components, I will share a solution for easy embedding of an HTML snippet and automatically adjusts the content height。
https://github.com/pragmatic-streamlit/streamlit-embeded
Install
pip install streamlit-embeded
Usage
import streamlit as st
from streamlit_embeded import st_embeded
source = """
"""
st_embeded(source)
Example
A very simple but usaful example is to use Pyinstrument in combination with complex Streamlit applications for profiling, thus ide…
2 Likes
New Component: streamlit-iframe-event converts window messages in iframes into component return values
Hi everyone, as a part of a series on sharing components, I will share a solution for converts window messages in iframes into component return values.
https://github.com/pragmatic-streamlit/streamlit-iframe-event
Install
pip install streamlit-iframe-event
Usage
import streamlit as st
event = st_iframe_event("https://example.com", key="test", default_width="400px")
st.write(event)
2 Likes
mapix
April 23, 2024, 9:22am
60
New Component: streamlit-molecular-selection allow selecting atoms from molecules
As a part of a series on sharing components, I will share a solution for selecting atoms from molecules is very useful for developing molecular optimization scenarios.
[Screenshot]
https://github.com/pragmatic-streamlit/streamlit-molecule-selection
Install
pip install streamlit-molecular-selection
Usage
import streamlit as st
#st.write(st_molecule_selection('CC(C)CN(CC(C(CC1CCCCC1)NC(OC1C(CCO2)C2OC1)=O)O)S(C(CC1)CCC1N)(=O)=O', height=100))
st.write(st_molecule_selection('CC(C)CN(CC(C(CC1CCCC…
3 Likes
mapix
April 23, 2024, 9:37am
61
New Component: Streamlit-CDN allows you to deploy multiple instances in K8S and host all Streamlit dependencies on your own CDN
Preload all Streamlit components in advance to ensure that static files are displayed properly in multiple instances.
Support rewriting all Streamlit components and Streamlit’s own static files to CDN in container environments.
Please note that this component cannot be used painlessly, it requires strong system development capabilities to understand and adapt to your own scenarios.
3 Likes