Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Readme
This streamlit component adds a Dialog (Modal) with two buttons to Streamlit Apps.
It implements the MUI Alert Dialog: https://mui.com/material-ui/react-dialog/
$ pip install st-mui-dialog
$ from st_mui_dialog import st_mui_dialog
$ answer = st_mui_dialog(title="Confirmation", content="Please confirm that you want to save the changes")
#Open Button Label
st_mui_dialog(..., button_txt = "Open the Dialog")
#Abort Button Label
st_mui_dialog(..., abortlabel = "DISAGREE")
#Agree Button Label
st_mui_dialog(..., abortlabel = "AGREE")
st_mui_dialog(..., divider = True)
#The open button will be hidden
st_mui_dialog(..., fullscreen = True)
Currently not working
st_mui_dialog(..., transition_mode = "zoom")
#if the transition mode is 'slide' the paramater 'slide_direction' is needed
st_mui_dialog(..., transition_mode = "slide", slide_direction = "up")
The width is always limited to the widht of the iframe
#Sets the max width to "xl"
st_mui_dialog(..., width_dialog = "xl")
#Always shows the max width of the dialog - If false the width will be dependent on the content.
st_mui_dialog(..., adapt_width_dialog = True)
#Button Types
#Open Button
st_mui_dialog(..., button_open_type = "primary")
#Agree Button
st_mui_dialog(..., button_agree_type = "warning")
#Abort Button
st_mui_dialog(..., button_abort_type = "success")
It is possible to apply CSS Styles to the different MUI Elements of the Dialog
st_mui_dialog(..., styling_dialog = """{"& .MuiModal-backdrop": {"backgroundColor": "red"},"& .MuiModal-container":{"backgroundColor" :"red"}""")
st_mui_dialog(..., styling_open_button = """{"backgroundColor" :"lightgreen"}""")
st_mui_dialog(..., styling_agree_button = """{"backgroundColor" :"yellow"}"""")
st_mui_dialog(..., styling_abort_button = """{"backgroundColor" :"blue"}""")
st_mui_dialog(..., styling_dialog_content = """{"backgroundColor" :"blue"}""")
st_mui_dialog(..., styling_dialog_title = """{"backgroundColor" :"blue"}""")
st_mui_dialog(..., styling_dialog_content_text = """{"backgroundColor" :"blue"}""")
It is possible to execute JavaScript commands on Open, Close, Agree and Abort.
st_mui_dialog(..., on_open = """console.log("Open")""")
st_mui_dialog(..., on_close = """console.log("Close")""")
st_mui_dialog(..., on_agree = """console.log("Agree")""")
st_mui_dialog(..., on_abort = """console.log("Abort")""")
FAQs
Streamlit Component for MUI Dialogs
We found that st-mui-dialog demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.