Looking for “engineering” components that mimic physical, tactile controls like Dash DAQ, LabVIEW, or MATLAB - LEDs, knobs, etc.
Here’s a Dash DAQ style that my boss would like me to recreate in Streamlit:
Looking for “engineering” components that mimic physical, tactile controls like Dash DAQ, LabVIEW, or MATLAB - LEDs, knobs, etc.
Here’s a Dash DAQ style that my boss would like me to recreate in Streamlit:
You can do this by using only streamlit, no need for components, and unfortunately, the UI will not be the same.
To get the same UI you need to be familiar with react components and how to build them for streamlit.
Giselle
Example :
Your question is interesting: The component as you present it doesn’t have an equivalent in Streamlit; it is a small DASH application.
In both DASH and Streamlit applications, there is interactivity: the widget is a JavaScript/HTML component that not only needs to display something appealing and ergonomic but also provide a result to the calling Python application.
In the case of Streamlit, the component’s JavaScript code uses the Streamlit.setComponentValue(…) instruction to communicate the component’s value to the Python part. In the case of Dash, I haven’t looked into it, but I imagine a similar behavior through the callback mechanism.
If your Dash component does not need to return a value to the Python application, you can consider an approach like this:
python
Copier le code
import streamlit as st
st.title("Streamlit App with Embedded Dash")
dash_url = "http://127.0.0.1:8050"
st.components.v1.iframe(src=dash_url, width=700, height=600, scrolling=True)
The constraint is to have a DASH server in addition to the Streamlit server.
However, if you need interactivity in the sense that you need to receive information from the component in Python, I’m afraid the only solution is to recode the component in React.
That said, creating a Streamlit component in React using antd or Material UI is quite simple, and if you wish, I can provide examples. But it does require at least some JavaScript skills.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.