| 
									
										
										
										
											2025-06-04 09:02:20 -04:00
										 |  |  | # ftxui {#ftxui}
 | 
					
						
							| 
									
										
										
										
											2025-05-20 14:35:17 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-30 20:13:47 +02:00
										 |  |  |  | 
					
						
							| 
									
										
										
										
											2025-05-30 19:32:42 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-20 14:35:17 +02:00
										 |  |  | FTXUI is organized into three modules, each building upon the previous: | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-31 23:19:18 +02:00
										 |  |  | 1. [ftxui/screen](#module-screen) - Low-level rendering | 
					
						
							|  |  |  | 2. [ftxui/dom](#module-dom) - Layout and composition | 
					
						
							|  |  |  | 3. [ftxui/component](#module-component) - User interaction | 
					
						
							| 
									
										
										
										
											2025-05-20 14:35:17 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | --- | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-31 23:19:18 +02:00
										 |  |  | # ftxui/screen
 | 
					
						
							| 
									
										
										
										
											2025-05-20 14:35:17 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | Defines: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - **`ftxui::Screen`**: a 2D grid of styled characters. | 
					
						
							|  |  |  | - **`ftxui::Pixel`**: the unit of rendering. | 
					
						
							|  |  |  | - Helpers like `ftxui::Color` and `Dimension`. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Use for direct terminal drawing and styling. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-31 23:19:18 +02:00
										 |  |  | <div class="section_buttons"> | 
					
						
							|  |  |  |   | 
					
						
							|  |  |  | |                                  Next | | 
					
						
							|  |  |  | |--------------------------------------:| | 
					
						
							|  |  |  | | [Documentation](module-screen.html) | | 
					
						
							|  |  |  |   | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-20 14:35:17 +02:00
										 |  |  | --- | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-31 23:19:18 +02:00
										 |  |  | # ftxui/dom
 | 
					
						
							| 
									
										
										
										
											2025-05-20 14:35:17 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | Provides: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - **`ftxui::Element`**: a tree structure for layout and UI. | 
					
						
							|  |  |  | - Composable and responsive elements. | 
					
						
							|  |  |  | - `Render()` to draw onto a `Screen`. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Ideal for structured, styled UIs. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-31 23:19:18 +02:00
										 |  |  | <div class="section_buttons"> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | |                                  Next | | 
					
						
							|  |  |  | |--------------------------------------:| | 
					
						
							|  |  |  | | [Documentation](module-dom.html) | | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | </div> | 
					
						
							| 
									
										
										
										
											2025-05-20 14:35:17 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-31 23:19:18 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | --- | 
					
						
							|  |  |  | # ftxui/component
 | 
					
						
							| 
									
										
										
										
											2025-05-20 14:35:17 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | Adds: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - **`ftxui::Component`**: stateful, interactive widgets. | 
					
						
							|  |  |  | - Built-ins: `Checkbox`, `Input`, `Menu`, `Button`. | 
					
						
							|  |  |  | - Supports keyboard/cursor input and composition. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Use for interactive apps. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-31 23:19:18 +02:00
										 |  |  | <div class="section_buttons"> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | |                                  Next | | 
					
						
							|  |  |  | |--------------------------------------:| | 
					
						
							|  |  |  | | [Documentation](module-component.html) | | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-20 14:35:17 +02:00
										 |  |  | --- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Modules can be used independently, or together: `screen → dom → component`. |