graph LR
Application_Lifecycle["Application Lifecycle"]
UI_Base_Elements["UI Base Elements"]
Terminal_Interaction["Terminal Interaction"]
Event_Handling["Event Handling"]
Styling_System["Styling System"]
Rendering_Engine["Rendering Engine"]
Layout_Engine["Layout Engine"]
Core_Utilities["Core Utilities"]
Text_Document_Model["Text Document Model"]
Widgets["Widgets"]
Application_Lifecycle -- "orchestrates" --> UI_Base_Elements
Application_Lifecycle -- "interacts with" --> Terminal_Interaction
Application_Lifecycle -- "dispatches messages via" --> Event_Handling
Application_Lifecycle -- "uses" --> Styling_System
Application_Lifecycle -- "uses" --> Core_Utilities
UI_Base_Elements -- "extended by" --> Widgets
UI_Base_Elements -- "receives events from" --> Event_Handling
UI_Base_Elements -- "styled by" --> Styling_System
UI_Base_Elements -- "arranged by" --> Layout_Engine
UI_Base_Elements -- "uses" --> Core_Utilities
Terminal_Interaction -- "generates events for" --> Event_Handling
Terminal_Interaction -- "receives output from" --> Rendering_Engine
Terminal_Interaction -- "uses" --> Core_Utilities
Event_Handling -- "dispatches to" --> UI_Base_Elements
Event_Handling -- "uses" --> Core_Utilities
Styling_System -- "applies to" --> UI_Base_Elements
Styling_System -- "provides styles to" --> Rendering_Engine
Styling_System -- "uses" --> Core_Utilities
Rendering_Engine -- "uses" --> Styling_System
Rendering_Engine -- "uses" --> Layout_Engine
Rendering_Engine -- "uses" --> Core_Utilities
Layout_Engine -- "arranges" --> UI_Base_Elements
Layout_Engine -- "uses" --> Core_Utilities
Core_Utilities -- "provides services to" --> Application_Lifecycle
Core_Utilities -- "provides services to" --> UI_Base_Elements
Core_Utilities -- "provides services to" --> Terminal_Interaction
Core_Utilities -- "provides services to" --> Event_Handling
Core_Utilities -- "provides services to" --> Styling_System
Core_Utilities -- "provides services to" --> Rendering_Engine
Core_Utilities -- "provides services to" --> Layout_Engine
Core_Utilities -- "provides services to" --> Text_Document_Model
Core_Utilities -- "provides services to" --> Widgets
Text_Document_Model -- "provides backend for" --> Widgets
Text_Document_Model -- "uses" --> Core_Utilities
Widgets -- "extends" --> UI_Base_Elements
Widgets -- "uses" --> Event_Handling
Widgets -- "uses" --> Styling_System
Widgets -- "uses" --> Rendering_Engine
Widgets -- "uses" --> Layout_Engine
Widgets -- "uses" --> Core_Utilities
Widgets -- "uses" --> Text_Document_Model
click Application_Lifecycle href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/textual/Application Lifecycle.md" "Details"
click UI_Base_Elements href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/textual/UI Base Elements.md" "Details"
click Terminal_Interaction href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/textual/Terminal Interaction.md" "Details"
click Event_Handling href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/textual/Event Handling.md" "Details"
click Styling_System href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/textual/Styling System.md" "Details"
click Rendering_Engine href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/textual/Rendering Engine.md" "Details"
click Layout_Engine href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/textual/Layout Engine.md" "Details"
click Core_Utilities href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/textual/Core Utilities.md" "Details"
click Text_Document_Model href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/textual/Text Document Model.md" "Details"
click Widgets href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/textual/Widgets.md" "Details"
The Textual framework provides a robust architecture for building rich terminal user interfaces. Its core functionality revolves around an Application Lifecycle that orchestrates UI components, handles events from terminal interactions, and renders visual elements using a sophisticated styling and layout system. Reactive data principles ensure UI updates are efficient, while a comprehensive set of widgets and utilities empower developers to create complex and interactive applications.
Manages the overall application startup, shutdown, and core event processing loop, including background task management and message dispatching.
Related Classes/Methods:
Provides the foundational structure for all interactive and visual elements in the UI, managing their position in the Document Object Model (DOM) tree and basic widget functionality.
Related Classes/Methods:
Manages low-level communication with the terminal, including parsing raw input sequences (keyboard, mouse) and sending control codes for output rendering across different operating systems and web environments.
Related Classes/Methods:
textual.driver.Driver(17:301)textual.drivers.windows_driver.WindowsDriver(16:137)textual.drivers.linux_driver.LinuxDriver(31:469)textual.drivers.web_driver.WebDriver(41:354)
Defines and processes various user and system events (e.g., keyboard presses, mouse clicks, window resizing), dispatching them to relevant components for action.
Related Classes/Methods:
Responsible for parsing, applying, and managing CSS rules, computed styles, and color definitions for UI elements, ensuring consistent visual presentation.
Related Classes/Methods:
textual.css.stylesheet.Stylesheet(142:731)textual.css.styles.Styles(858:1298)textual.color.Color(137:661)
Orchestrates the visual rendering pipeline, converting UI elements and content into displayable character strips and composing them for final output to the terminal.
Related Classes/Methods:
textual._compositor.Compositor(281:1240)textual.visual.Visual(106:233)textual.strip.Strip(67:735)
Determines the positioning and sizing of UI elements on the screen based on various layout algorithms (e.g., horizontal, vertical, grid) and CSS properties.
Related Classes/Methods:
textual.layout.Layout(203:309)textual.layouts.horizontal.HorizontalLayout(15:120)textual.layouts.vertical.VerticalLayout(15:124)textual.layouts.grid.GridLayout(15:322)
Provides foundational helper classes and functions for common tasks such as geometric calculations, caching, timing, animation, and various internal mechanisms that support the entire framework.
Related Classes/Methods:
textual.geometry.Region(317:1116)textual.cache.LRUCache(20:207)textual.timer.Timer(32:202)textual.rlock.RLock(6:47)
The core data structures and logic for managing editable text content, including history (undo/redo), syntax awareness, and navigation within the document.
Related Classes/Methods:
A collection of specialized UI components for displaying and interacting with various types of content, including input fields, text areas, data tables, trees, and general-purpose containers.
Related Classes/Methods: