Back to Textual

Widgets

docs/widget_gallery.md

8.2.57.4 KB
Original Source

Widgets

Welcome to the Textual widget gallery.

We have many more widgets planned, or you can build your own.

!!! info

Textual is a **TUI** framework. Everything below runs in the *terminal*.

Button

A simple button with a variety of semantic styles.

Button reference{ .md-button .md-button--primary }

{.textual

Checkbox

A classic checkbox control.

Checkbox reference{ .md-button .md-button--primary }

{.textual

Collapsible

Content that may be toggled on and off by clicking a title.

Collapsible reference{ .md-button .md-button--primary }

{.textual

ContentSwitcher

A widget for containing and switching display between multiple child widgets.

ContentSwitcher reference{ .md-button .md-button--primary }

DataTable

A powerful data table, with configurable cursors.

DataTable reference{ .md-button .md-button--primary }

{.textual

Digits

Display numbers in tall characters.

Digits reference{ .md-button .md-button--primary }

{.textual

DirectoryTree

A tree view of files and folders.

DirectoryTree reference{ .md-button .md-button--primary }

{.textual

A footer to display and interact with key bindings.

Footer reference{ .md-button .md-button--primary }

{.textual

A header to display the app's title and subtitle.

Header reference{ .md-button .md-button--primary }

{.textual

Input

A control to enter text.

Input reference{ .md-button .md-button--primary }

{.textual

Label

A simple text label.

Label reference{ .md-button .md-button--primary }

A clickable link that opens a URL.

Link reference{ .md-button .md-button--primary }

ListView

Display a list of items (items may be other widgets).

ListView reference{ .md-button .md-button--primary }

{.textual

LoadingIndicator

Display an animation while data is loading.

LoadingIndicator reference{ .md-button .md-button--primary }

{.textual

Log

Display and update lines of text (such as from a file).

Log reference{ .md-button .md-button--primary }

{.textual

MarkdownViewer

Display and interact with a Markdown document (adds a table of contents and browser-like navigation to Markdown).

MarkdownViewer reference{ .md-button .md-button--primary }

{.textual

Markdown

Display a markdown document.

Markdown reference{ .md-button .md-button--primary }

{.textual

MaskedInput

A control to enter input according to a template mask.

MaskedInput reference{ .md-button .md-button--primary }

{.textual

OptionList

Display a vertical list of options (options may be Rich renderables).

OptionList reference{ .md-button .md-button--primary }

{.textual

Placeholder

Display placeholder content while you are designing a UI.

Placeholder reference{ .md-button .md-button--primary }

{.textual

Pretty

Display a pretty-formatted Rich renderable.

Pretty reference{ .md-button .md-button--primary }

{.textual

ProgressBar

A configurable progress bar with ETA and percentage complete.

ProgressBar reference{ .md-button .md-button--primary }

{.textual

RadioButton

A simple radio button.

RadioButton reference{ .md-button .md-button--primary }

{.textual

RadioSet

A collection of radio buttons, that enforces uniqueness.

RadioSet reference{ .md-button .md-button--primary }

{.textual

RichLog

Display and update text in a scrolling panel.

RichLog reference{ .md-button .md-button--primary }

{.textual

Rule

A rule widget to separate content, similar to a <hr> HTML tag.

Rule reference{ .md-button .md-button--primary }

{.textual

Select

Select from a number of possible options.

Select reference{ .md-button .md-button--primary }

{.textual

SelectionList

Select multiple values from a list of options.

SelectionList reference{ .md-button .md-button--primary }

{.textual

Sparkline

Display numerical data.

Sparkline reference{ .md-button .md-button--primary }

{.textual

Static

Displays simple static content. Typically used as a base class.

Static reference{ .md-button .md-button--primary }

Switch

An on / off control, inspired by toggle buttons.

Switch reference{ .md-button .md-button--primary }

{.textual

Tabs

A row of tabs you can select with the mouse or navigate with keys.

Tabs reference{ .md-button .md-button--primary }

{.textual

TabbedContent

A Combination of Tabs and ContentSwitcher to navigate static content.

TabbedContent reference{ .md-button .md-button--primary }

{.textual

TextArea

A multi-line text area which supports syntax highlighting various languages.

TextArea reference{ .md-button .md-button--primary }

{.textual

Tree

A tree control with expandable nodes.

Tree reference{ .md-button .md-button--primary }

{.textual