Widget
A widget is a self-contained user-interface component that displays information or provides a focused interaction.
Get Programming: Learn to code with Python
A widget is a graphical user-interface component that displays information or accepts user interaction within a window.
- How it is used
- Uses graphical controls to build interactive GUI windows.
- How deep it goes
- Explains creation, placement, types, and event handling, then applies them in a countdown example.
- Examples
- Uses buttons, text boxes, labels, progress bars, menus, and a countdown timer.
- What you can do after
- Build it from scratch by adding tkinter widgets, placing them in a window, and connecting actions to event handlers.
Read how Get Programming: Learn to code with Python explains widget →
Python How-To
A widget is a self-contained user-interface component that displays information or provides an interaction.
- How it is used
- Builds Streamlit web-app interfaces that collect input, trigger actions, arrange content, and display information.
- How deep it goes
- Defines widget categories and demonstrates configuration, columns, filtering, callbacks, and reruns, while deferring detailed widget usage instructions.
- Examples
- Uses task filters, a View Detail button, sidebar controls, columns, task forms, and interfaces for creating, updating, and deleting tasks.
- What you can do after
- Apply it via Streamlit to construct interactive task-list, detail, filtering, and data-entry interfaces.
Related concepts
- Streamlitused by · Streamlit is an open-source Python framework for building interactive web applications, particularly for data and machine-learning applications.
- check boxincludes · A checkbox is an interactive form control representing an independently selectable binary option that can be checked or cleared.
- canvas elementincludes · The HTML canvas element is a scriptable bitmap drawing surface in a web document for rendering graphics.
- sessionconfigured by · A session is a bounded interaction context associated with a user, client, or process that may maintain state across related operations or requests.
- st.metricincludes · st.metric is a Streamlit display function that presents a labeled metric value and optionally its change from a reference value.
- st.number_inputincludes · st.number_input is a Streamlit function that creates an input widget for entering a numeric value.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

