Skip to content

Textual

Dennis Lee edited this page May 27, 2026 · 1 revision

title: Textual radar_quadrant: Languages & Frameworks radar_ring: Assess radar_position: inner created: 2026-05-26 last_updated: 2026-05-26 tags: [python, tui, terminal, ui, framework, textualize] source_url: https://github.com/textualize/textual

Textual

A Python TUI (terminal user interface) framework from Textualize — the team behind the rich library. Textual allows building sophisticated terminal applications using web-inspired paradigms: CSS-like layout, composable widgets, and an event-driven interaction model. Apps run in the terminal or in a web browser with no code changes.

Design Model

Textual borrows from web development rather than from curses. Layouts are expressed in a CSS-like syntax (Textual CSS) that handles flexbox-style positioning, sizing, and theming. Widgets — buttons, inputs, data tables, progress bars, trees, text areas — are composed into a screen hierarchy. Events (key press, click, focus, scroll) are handled by binding methods to event types, similar to JavaScript DOM events.

The dual runtime (terminal + browser) is achieved via the Textual Serve capability: the same app can be served over HTTP and accessed in a browser as a web app, enabling internal tools to reach non-terminal users without a separate frontend.

Relationship to Alternatives

  • curses: C-level API, hostile to use directly from Python, no widget system.
  • urwid: older Python TUI library, less actively maintained, narrower widget set.
  • blessed: thin wrapper over terminfo; simpler but lacks layout and widget systems.
  • rich: Textualize's own formatting library; Textual builds on rich for rendering but adds interactivity and layout.

Textual is the current high-water mark for Python TUI development — the most capable, most actively maintained, and most documented option.

Production Usage

Used in the Datasette ecosystem, by internal tooling teams, and as the foundation for several open-source CLIs. 30,000+ GitHub stars as of 2025. Active development with frequent releases.

Radar Assessment

Placed in Languages & Frameworks / Assess / inner. Python-native, actively maintained, and fills a clear gap for developers who need more than flat text output from CLI tools. Inner position reflects immediate applicability to any Python project that has outgrown simple argparse output — dashboards, log viewers, interactive database browsers, configuration editors. Trial gate: one interactive TUI app replacing a flat CLI output or a manual dashboard, with at least three widget types and keyboard navigation in active use.

Clone this wiki locally