textual-api-reference

Provides complete API reference for Textual TUI widgets including reactive attributes and messages.

1|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/cjthompson/claude-code-config --skill textual-api-reference-cjthompson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: textual-api-reference
Source: https://github.com/cjthompson/claude-code-config/tree/main/plugins/textual/skills/textual-api-reference
Command: npx skills add https://github.com/cjthompson/claude-code-config --skill textual-api-reference-cjthompson

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When building terminal user interfaces with the Textual Python framework, developers frequently need to look up widget constructor parameters, reactive attributes, and emitted messages, which requires digging through scattered documentation. ## Core Features & Use Cases - Complete Widget Reference: Covers all built-in Textual widgets including Button, Input, DataTable, Tree, TextArea, Select, Tabs, and more, with attribute types, defaults, and read-only properties. - Message and Method Documentation: Lists every message each widget emits (e.g. Button.Pressed, DataTable.CellSelected) plus key methods like add_row, update_cell, and move_cursor. - Hallucination Guards: Documents common mistakes such as the nonexistent show_clock attribute on Header and the correct import path for ContentSwitcher. - Use Case: While building a Textual dashboard with a DataTable and form inputs, quickly check which reactive attributes control cursor behavior and which messages to handle for selection events. ## Quick Start Ask the AI to show the reactive attributes and messages for the Textual DataTable widget.

Frequently Asked Questions about textual-api-reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use Textual widgets in a Python TUI application?

Import widgets from textual.widgets, such as Button, Input, or DataTable, and compose them in your app's compose method. Each widget exposes reactive attributes that trigger re-renders on change and emits messages like Button.Pressed that you handle with on_ methods.

What reactive attributes does the Textual DataTable widget have?

DataTable exposes show_header, fixed_rows, zebra_stripes, cursor_type, cursor_coordinate, and cell_padding among others. It also provides methods like add_column, add_row, update_cell, and sort, plus messages such as CellSelected and RowHighlighted.

Does the Textual Header widget have a show_clock attribute?

No, show_clock does not exist on Header and is a common hallucination. The clock is always shown; control its format with the time_format attribute, and set tall after mount or via CSS since it cannot be passed to the constructor.

How do I handle messages from Textual Input and Select widgets?

Input emits Changed, Submitted, and Blurred messages carrying the current value, while Select emits Changed with the selected value. Every message includes a .control attribute pointing to the posting widget, often with a widget-named alias like .button or .select.

What is the difference between Textual Log and RichLog widgets?

Log appends plain-text lines only and does not support Rich markup, offering write_line and write_lines methods. RichLog accepts Rich renderables with optional markup, highlighting, and wrapping, making it suitable for formatted output like tables and syntax blocks.