Input Widgets with Streamlit

Learn how to type in values with Streamlit input widgets.

Streamlit has widgets to allow users to directly type in the required values. We can do this for both numerical and textual values.

The number input

This widget enables users to type in the numbers directly.

Just as for the slider widget, we can set it up to accept integers or floats, depending on how we specify the input parameters.

It also has “+” and “-” keys to increment and decrement values. The change happens in terms of the steps specified. If none is specified, the step is 1 for integers and 0.01 for floats.

Get hands-on with 1200+ tech skills courses.