Widgets Reference
Complete list of all Textual widgets available in the builder.
Builder Schema
- class genro_textual.textual_builder.TextualWidgetsMixin[source]
All Textual widget @element and @component definitions.
Defined as a mixin so that subclasses of TextualBuilder automatically inherit the full schema via MRO.
- itemgrid(min_column_width=20)[source]
A grid container that arranges items in columns.
- Parameters:
min_column_width (
int)
- button(content='', label=None, variant='default', tooltip=None, action=None)[source]
A simple clickable button.
- checkbox(content='', label='', value=False, button_first=True, tooltip=None, compact=False)[source]
A check box widget that represents a boolean value.
- collapsible(title='Toggle', collapsed=True, collapsed_symbol='▶', expanded_symbol='▼')[source]
A collapsible container.
- collapsibletitle(content='', label=None, collapsed_symbol=None, expanded_symbol=None, collapsed=None)[source]
Title and symbol for the Collapsible.
- datatable(show_header=True, show_row_labels=True, fixed_rows=0, fixed_columns=0, zebra_stripes=False, header_height=1, show_cursor=True, cursor_foreground_priority='css', cursor_background_priority='renderable', cursor_type='cell', cell_padding=1)[source]
A tabular widget that contains data.
- row(key=None, label=None, height=1)[source]
A row for DataTable. Value can be a list of cell values.
- digits(content='', value='')[source]
A widget to display numerical values using a 3x3 grid of unicode characters.
- header(content='', show_clock=False, icon=None, time_format=None)[source]
A header widget with icon and clock.
- input(content='', value=None, placeholder='', password=False, restrict=None, type='text', max_length=0, valid_empty=False, select_on_focus=True, tooltip=None, compact=False)[source]
A text input widget.
- keypanel(can_focus=None, can_focus_children=None, can_maximize=None)[source]
Textual KeyPanel widget.
- label(content='', variant=None, expand=False, shrink=False, markup=True)[source]
A simple label widget for displaying text-oriented renderables.
- link(content='', text=None, url=None, tooltip=None)[source]
A simple, clickable link that opens a URL.
- listitem(markup=True)[source]
A widget that is an item within a ListView.
- Parameters:
markup (
bool)
- loadingindicator(content='')[source]
Display an animated loading indicator.
- Parameters:
content (
str)
- markdown(content='', markdown=None, parser_factory=None, open_links=True)[source]
Textual Markdown widget.
- markdownviewer(content='', markdown=None, show_table_of_contents=True, parser_factory=None, open_links=True)[source]
A Markdown viewer widget.
- maskedinput(content='', template=None, value=None, placeholder='', valid_empty=False, select_on_focus=True, tooltip=None, compact=False)[source]
A masked text input widget.
- placeholder(content='', label=None, variant='default')[source]
A simple placeholder widget to use before you build your custom widgets.
- progressbar(content='', total=None, show_bar=True, show_percentage=True, show_eta=True)[source]
A progress bar widget.
- radiobutton(content='', label='', value=False, button_first=True, tooltip=None, compact=False)[source]
A radio button widget that represents a boolean value.
- radioset(tooltip=None, compact=False)[source]
Widget for grouping a collection of radio buttons into a set.
- richlog(content='', max_lines=None, min_width=78, wrap=False, highlight=False, markup=False, auto_scroll=True)[source]
A widget for logging Rich renderables and text.
- rule(content='', orientation='horizontal', line_style='solid')[source]
A rule widget to separate content, similar to a <hr> HTML tag.
- select(content='', options=None, prompt='Select', allow_blank=True, value=None, type_to_search=True, tooltip=None, compact=False)[source]
Widget to select from a list of possible options.
- selectionlist(compact=False)[source]
A vertical selection list that allows making multiple selections.
- Parameters:
compact (
bool)
- sparkline(content='', data=None, min_color=None, max_color=None, summary_function=None)[source]
A sparkline widget to display numerical data.
- static(content='', expand=False, shrink=False, markup=True)[source]
A widget to display simple static content.
- switch(content='', value=False, animate=True, tooltip=None)[source]
A switch widget that represents a boolean value.
- tabbedcontent(initial='')[source]
A container with associated tabs to toggle content visibility.
- Parameters:
initial (
str)
- textarea(content='', text='', language=None, theme='css', soft_wrap=True, tab_behavior='focus', read_only=False, show_cursor=True, show_line_numbers=False, line_number_start=1, max_checkpoints=50, tooltip=None, compact=False, highlight_cursor_line=True, placeholder='')[source]
Textual TextArea widget.
- tree(content='', label=None, data=None, store=None)[source]
A widget for displaying and navigating data in a tree.
- binding(key='', action='', description='')[source]
Key binding: maps a key press to an action method.