Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bluegob/streamlit-speed-dial
a simple Speed Dial component in streamlit to display actions
https://github.com/bluegob/streamlit-speed-dial
python speeddial streamlit streamlit-component
Last synced: about 2 months ago
JSON representation
a simple Speed Dial component in streamlit to display actions
- Host: GitHub
- URL: https://github.com/bluegob/streamlit-speed-dial
- Owner: BlueGob
- License: mit
- Created: 2024-01-10T15:21:32.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-11T10:30:10.000Z (about 1 year ago)
- Last Synced: 2024-11-15T09:49:24.659Z (2 months ago)
- Topics: python, speeddial, streamlit, streamlit-component
- Language: Python
- Homepage:
- Size: 335 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# streamlit-speed-dial
Streamlit component that allows you to make speed dial
## Installation instructions
```sh
pip install streamlit_speed_dial
```![gif_example](https://github.com/BlueGob/streamlit-speed-dial/assets/59932913/66b4a7a9-1c7e-4fab-8462-636c29ee188c)
## Getting started with streamlit-speed-dial
```python
import streamlit as st
from streamlit_speed_dial import streamlit_speed_dial
st.title("streamlit speed dial component")
st.markdown("---")
col1, col2 = st.columns(2)
with col2:
button_clicked = streamlit_speed_dial(
[{"icon":"💾","name":"save"},
{"icon":"✍🏼","name":"edit"},
{"icon":"❌","name":"delete"},
{"icon":"↪","name":"share"}
],
"up")
with col1:
st.subheader(f"{button_clicked} is pressed ")
```
## Properties
The speed dial can be customized using the following parameters:
| Property | Type | Description | Default |
| -------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- | ----------- |
|`actions`|list[dict] | the list of buttons to display when hovering or clicking on the speeddial button.Each element in the list is a dictionary representing an action or button. | `[]`|
|`direction` | string | The direction in which the speed-dial button expands to reveal the list of actions |`up`|## Returns
speed dial returns a string containing the clicked action.
| Property | Type | Description | Default |
| -------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- | ----------- |
|`selected`|string | name of the action | `None`|