Textualize /textual
The lean application framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser.
★ 37,622⑂ 1,399👁 187⑃ 2,834● 2,463▤ 223◈ 1,337
37,622
stars
+12
1,399
forks
187
watchers
2,834
prs
2,463
issues
223
releases
1,337
discussions
README
!OS support
!textual-splash
Textual
Build cross-platform user interfaces with a simple Python API. Run your apps in the terminal or a web browser.
Textual's API combines modern Python with the best of developments from the web world, for a lean app development experience.
De-coupled components and an advanced testing framework ensure you can maintain your app for the long-term.
Want some more examples? See the examples directory.
python
"""
An App to show the current time.
"""
from datetime import datetime
from textual.app import App, ComposeResult
from textual.widgets import Digits
class ClockApp(App):
CSS = """
Screen { align: center middle; }
Digits { width: auto; }
"""
def compose(self) - ComposeResult:
yield Digits("")
def on_ready(self) - None:
self.update_clock()
self.set_interval(1, self.update_clock)
def update_clock(self) - None:
clock = datetime.now().time()
self.query_one(Digits).update(f"{clock:%T}")
if __name__ == "__main__":
app = ClockApp()
app.run()
[!TIP]
Textual is an asynchronous framework under the hood. Which means you can integrate your apps with async libraries — if you want to.
If you don't want or need to use async, Textual won't force it on you.
Widgets
Textual's library of widgets covers everything from buttons, tree controls, data tables, inputs, text areas, and more…
Combined with a flexible layout system, you can realize any User Interface you need.
Predefined themes ensure your apps will look good out of the box.
!buttons
!tree
!datatables
!inputs
!listview
!textarea
Installing
Install Textual via pip:
pip install textual textual-dev
See getting started for details.
Demo
Run the following command to see a little of what Textual can do:
python -m textual
Or try the textual demo without installing (requires uv):
bash
uvx --python 3.12 textual-demo
Dev Console
How do you debug an app in the terminal that is also running in the terminal?
The textual-dev package supplies a dev console that connects to your application from another terminal.
In addition to system messages and events, your logged messages and print statements will appear in the dev console.
See the guide for other helpful tools provided by the textual-dev package.
Command Palette
Textual apps have a fuzzy search command palette.
Hit ctrl+p to open the command palette.
It is easy to extend the command palette with custom commands for your application.
!Command Palette
Textual ❤️ Web
Textual apps are equally at home in the browser as they are the terminal. Any Textual app may be served with textual serve — so you can share your creations on the web.
Here's how to serve the demo app:
textual serve "python -m textual"
In addition to serving your apps locally, you can serve apps wTop issues
#5385unable to quit app from the keyboard within vscode37 comments · 2024-12-12#3576Date Picker26 comments · 2023-10-23#4955Unable to switch tabs in TabbedContent using a key binding18 comments · 2024-08-30#1490Watch Highlander for the first time15 comments · 2023-01-05#872Look at Windows key handling15 comments · 2022-10-11#6250Kitty Keyboard Protocol on Windows doesn't handle the `Escape` button properly12 comments · 2025-11-25#5011Improve cosmetics on Linux vconsole11 comments · 2024-09-16#2940CSS Transition rubber bands when %'s are used11 comments · 2023-07-14
Discussions
#6751Made with Textual: PortPilot, a TUI for local ports and processes0 comments · 2026-10-31#6748Help for becoming the contributor1 comments · 2026-10-27#6747Tab key behavior inconsistent between machines1 comments · 2026-10-26#6739Releases status1 comments · 2026-10-20#6730To do markdown rendering0 comments · 2026-10-04#6729Could a specific option for background ANSI tranparency be added?1 comments · 2026-10-04#6727could `DataTable.rows` be documented as insertion ordered?0 comments · 2026-10-02#6724can one change the description of a binding dynamically2 comments · 2026-09-30
Latest release
The more super release v8.2.8 2026-06-30Fixes for extended key processing, and a crash bug for clicking the screen padding area. [8.2.8] - 2026-06-30 Fixed - Fixed parsing Kitty extended keys with multiple codepoints https://github.com/Textualize/textual/pull/6592 - Fixed crash when clicking in the Screen's padding https://github.com/Textualize/textual/pull/6598 Changed - super+backspace is now an alias for ctrl+u in Input and TextArea https://github.com/Textualize/textual/pull/6594 - alt+backspace (option+backspace on Mac) has the same effect as ctrl+backspace in Input and TextArea https://github.com/Textualize/