Widgets#

Every visual component you place inside a window — actions, inputs, selection controls, data displays, layout containers, and navigation. All are importable directly as bootstack.<name> (commonly import bootstack as bs). For usage, screenshots, and worked examples, see the Widgets catalog; this page is the complete lookup reference.

Actions#

Buttons and button groups for triggering commands.

Button

A clickable action trigger.

ButtonGroup

A row (or column) of visually-connected buttons sharing accent and variant.

Inputs#

Text, number, path, date/time, and slider inputs. Most bind to a signal= / textsignal= and support validation rules=.

CodeEditor

A full-featured code editor with line numbers, bracket matching, and syntax highlighting.

DateField

A date input field with an optional calendar picker button.

NumberField

A numeric input field with optional stepper buttons.

PasswordField

A masked text field for password input with an optional visibility toggle.

PathField

A text field with a browse button that opens a native file/directory dialog.

RangeSlider

A two-handle slider for selecting a low/high value range.

Slider

A single-handle slider for selecting a numeric value within a range.

SpinnerField

A text-entry field with spin buttons for stepping through values.

TextArea

A multi-line text input with optional label, placeholder, and scrollbars.

TextField

Single-line text input with optional label, message, and validation.

TimeField

A time-input field with a searchable dropdown of time intervals.

Selection#

Checkboxes, switches, radio and toggle groups, dropdowns, and the calendar. RadioGroup is built from Radio / RadioToggleButton items.

Calendar

An inline calendar for single-date or date-range selection.

Checkbox

A labeled checkbox — checked or unchecked.

Radio

A single radio button — one selectable option in a mutually-exclusive group.

RadioGroup

A group of mutually exclusive radio buttons.

RadioToggleButton

A radio button that renders as a toggle button — toolbar/segmented-control style.

Select

A single-selection dropdown field.

SelectButton

A button that opens a dropdown value list — a button-styled alternative to Select.

Switch

A toggle switch — on or off.

ToggleButton

A button that stays pressed when active — toolbar-style toggle.

ToggleGroup

A group of toggle buttons — single-select or multi-select.

Data display#

Read-only views of values and records — text and badges, progress and gauges, and the list, table, and tree views for collections. ListView, DataTable, and Tree bind to a data_source=; Tree exposes its rows as TreeNode handles.

Badge

Compact styled chip for status indicators, counts, and tags.

DataTable

A feature-rich data table with sorting, filtering, search, and grouping.

Gauge

A circular gauge for displaying a value within a range.

Label

Static text display with optional icon, semantic styling, and font tokens.

ListView

A virtual-scrolling list for efficiently displaying large datasets.

ProgressBar

A progress indicator bar.

Tree

A hierarchical tree for navigation and selection.

TreeNode

A single node in a Tree.

Media#

Image and media display. Picture shows an Image scaled to fit, with fit modes, rounded corners, and animated-GIF playback; Gallery is a record-native, recycling grid of selectable thumbnails; Carousel steps through image slides one at a time with transitions and autoplay; Avatar is a small identity badge showing a picture or initials.

Avatar

A small identity badge — a picture or initials on a filled tile.

Carousel

Shows one image slide at a time, with prev/next navigation.

Gallery

A scrollable, selectable grid of image thumbnails.

Picture

Displays an image, scaled to fit, with optional animation.

Layout#

Containers that arrange children — stacks, grids, and scroll regions, plus the framed and collapsible groupings. Accordion exposes its sections as AccordionSection handles and SplitView its panes as SplitPane handles.

Accordion

A list of collapsible sections, optionally limited to one open at a time.

AccordionSection

A handle for one accordion section — both a layout context and a live controller.

Card

A card-surface container that groups content with an elevated background and border.

Grid

A container that arranges children in rows and columns.

GroupBox

A labeled container that groups related content inside a bordered frame.

HStack

Horizontal stack — lays out children left-to-right with optional gap and alignment.

ScrollView

A canvas-based scrollable container.

Separator

A horizontal or vertical dividing line.

SplitPane

A handle for one split pane — both a layout context and a live controller.

SplitView

A resizable split container with panes separated by draggable sashes.

VStack

Vertical stack — lays out children top-to-bottom with optional gap and alignment.

Chrome bars and menus#

Window chrome strips — a command bar, a passive status bar, a window menu bar, a dropdown menu button, and a right-click context menu.

CommandBar

A horizontal strip of buttons, labels, and other widgets.

StatusBar

A horizontal status band of passive segments — counts, sync state, a ready message.

ContextMenu

A popup menu that attaches to a target widget and opens on a gesture or manual call.

ContextMenuItem

Data class for context menu items.

MenuButton

A button that opens a dropdown menu when clicked.

Overlays#

Transient, floating UI — hover tooltips and the three message surfaces (passive toast, persistent notification, and in-app snackbar).

Notification

A persistent corner message the user closes themselves.

Snackbar

A transient message at the app window's bottom edge with one action.

Tooltip

A hover tooltip attached to a target widget.

snackbar

Show a snackbar at the window's bottom edge, and return immediately.

toast

Show a passive toast that dismisses itself, and return immediately.

Forms#

A declarative form builder and the item types that describe its layout — fields, groups, and tabbed sections.

FieldItem

A single field in a Form, addressed by its key.

Form

Data-entry form built from data or explicit field definitions.

FormItem

Represent a PEP 604 union type

GroupItem

A labeled group of fields with its own column layout, placed in a Form.

TabItem

A single tab within a TabsItem.

TabsItem

A tab container holding one or more TabItem entries, placed in a Form.

Accordion

A list of collapsible sections, optionally limited to one open at a time.

AccordionSection

A handle for one accordion section — both a layout context and a live controller.

Avatar

A small identity badge — a picture or initials on a filled tile.

Badge

Compact styled chip for status indicators, counts, and tags.

Button

A clickable action trigger.

ButtonGroup

A row (or column) of visually-connected buttons sharing accent and variant.

Calendar

An inline calendar for single-date or date-range selection.

Card

A card-surface container that groups content with an elevated background and border.

Carousel

Shows one image slide at a time, with prev/next navigation.

Checkbox

A labeled checkbox — checked or unchecked.

CodeEditor

A full-featured code editor with line numbers, bracket matching, and syntax highlighting.

CommandBar

A horizontal strip of buttons, labels, and other widgets.

ContextMenu

A popup menu that attaches to a target widget and opens on a gesture or manual call.

ContextMenuItem

Data class for context menu items.

DataTable

A feature-rich data table with sorting, filtering, search, and grouping.

DateField

A date input field with an optional calendar picker button.

FieldItem

A single field in a Form, addressed by its key.

Form

Data-entry form built from data or explicit field definitions.

FormItem

Represent a PEP 604 union type

Gallery

A scrollable, selectable grid of image thumbnails.

Gauge

A circular gauge for displaying a value within a range.

Grid

A container that arranges children in rows and columns.

GroupBox

A labeled container that groups related content inside a bordered frame.

GroupItem

A labeled group of fields with its own column layout, placed in a Form.

HStack

Horizontal stack — lays out children left-to-right with optional gap and alignment.

Label

Static text display with optional icon, semantic styling, and font tokens.

ListView

A virtual-scrolling list for efficiently displaying large datasets.

MenuButton

A button that opens a dropdown menu when clicked.

Notification

A persistent corner message the user closes themselves.

NumberField

A numeric input field with optional stepper buttons.

PageStack

A browser-style navigation container showing one page at a time.

PasswordField

A masked text field for password input with an optional visibility toggle.

PathField

A text field with a browse button that opens a native file/directory dialog.

Picture

Displays an image, scaled to fit, with optional animation.

ProgressBar

A progress indicator bar.

Radio

A single radio button — one selectable option in a mutually-exclusive group.

RadioGroup

A group of mutually exclusive radio buttons.

RadioToggleButton

A radio button that renders as a toggle button — toolbar/segmented-control style.

RangeSlider

A two-handle slider for selecting a low/high value range.

ScrollView

A canvas-based scrollable container.

Select

A single-selection dropdown field.

SelectButton

A button that opens a dropdown value list — a button-styled alternative to Select.

Separator

A horizontal or vertical dividing line.

Slider

A single-handle slider for selecting a numeric value within a range.

Snackbar

A transient message at the app window's bottom edge with one action.

snackbar

Show a snackbar at the window's bottom edge, and return immediately.

SpinnerField

A text-entry field with spin buttons for stepping through values.

SplitPane

A handle for one split pane — both a layout context and a live controller.

SplitView

A resizable split container with panes separated by draggable sashes.

StackPage

A handle for one page — both a layout context and a navigation target.

StatusBar

A horizontal status band of passive segments — counts, sync state, a ready message.

Switch

A toggle switch — on or off.

TabItem

A single tab within a TabsItem.

TabPage

A handle for one tab — both a layout context and a live controller.

Tabs

A tabbed container.

TabsItem

A tab container holding one or more TabItem entries, placed in a Form.

TextArea

A multi-line text input with optional label, placeholder, and scrollbars.

TextField

Single-line text input with optional label, message, and validation.

TimeField

A time-input field with a searchable dropdown of time intervals.

toast

Show a passive toast that dismisses itself, and return immediately.

ToggleButton

A button that stays pressed when active — toolbar-style toggle.

ToggleGroup

A group of toggle buttons — single-select or multi-select.

Tooltip

A hover tooltip attached to a target widget.

Tree

A hierarchical tree for navigation and selection.

TreeNode

A single node in a Tree.

VStack

Vertical stack — lays out children top-to-bottom with optional gap and alignment.