A widget is a self-contained interface element that displays information or accepts user interaction. In Streamlit, widgets let a Python script provide buttons, text inputs, choices, numeric controls, multimedia, and date or time controls while the framework handles layout. section 14.4.1
Use widgets to build practical web-app interactions:
- Create controls such as buttons, radio choices, filters, and text inputs by specifying the widget type and its configuration. section 14.4.1
- Organize related elements with st.columns([3, 1]); the returned column references can receive widgets such as a View Detail button. section 14.4.5
- Use widget input to retrieve filtering parameters, sort tasks, and display the resulting data. section 14.4.5
- Account for Streamlit rerunning the entire script from top to bottom when an input changes; session state provides a workaround for some use cases. section 14.4.1
Task-management interface
A task list places each task beside a View Detail button. Columns provide a 3:1 layout ratio, while the button receives the task identifier and calls wants_task_detail with the task as an argument. Sidebar widgets configure status, urgency, and content filters; the main area then shows the matching tasks. section 14.4.5 section 14.4.2
Figure 14.6 The available widgets in the streamlit framework. The six categories are Clickable (buttons), Single or Multiple Choice, Numeric Data, Textual Data, Multimedia, and Date and Time.
Browse the widget categories: clickable controls, single or multiple choice, numeric data, textual data, multimedia, and date and time. section 14.4.1

