Awesome-streamlit.org Change Log

Custom Widget Hack - Login App Added

In this app I show how to create a custom login widget in Streamlit using some different hacks

  • A hidden st.text_box for transfering custom state like username and password between client and server
    • A small js/ React snippet for setting the value and triggering the keypress of the text_box
  • st.bokeh_chart for using custom html, css and javascript.

Perspectives

I see custom widgets as a way of enabling even more awesome analytics apps in Streamlit.

This hack could be generalized and wrapped into a more general api for creating custom widgets.

So in principle you should be able to get your frontend developer to create custom widgets for clicks on tables, plots and Javascript libraries like Amphion Robotics

Some time in the future the Streamlit developers would develop a secure and robust api for custom widgets making the need for this type of hack obsolete. See for example Issue 428

Use this at your own risk!

PLEASE NOTE THIS IS A HACK AND MAY NOT BE SECURE!

1 Like