Widget selection atlas
Prefer the built-in widget that already matches the interaction model.
High-value widgets
DataTable
Use for:
- searchable result sets
- keyboard navigation over rows
- dashboards with metrics or records
- master/detail layouts
Prefer over:
- manual Rich
Tablerendered intoStatic - custom cursor logic for rows
Pair with:
- filter
Input - detail
Static/Markdown - responsive pane layout
DirectoryTree
Use for:
- file browsers
- repository explorers
- import pickers
- project navigation
Pair with:
- preview pane
TextAreaorMarkdownViewer- path/status footer
MarkdownViewer
Use for:
- rendered notes, help, changelogs, docs, AI output
- long-form content needing browser-like navigation
Prefer over:
- hand-rendering markdown into many small widgets
TextArea
Use for:
- text/code editing
- configuration editors
- scratch pads
- prompt builders
Pair with:
- save action
- status line
- optional preview or lint output
TabbedContent / TabPane
Use for:
- grouped settings
- alternate detail views
- inspector panes
Prefer over:
- hand-written tab state unless the behaviour is highly custom
Log / RichLog
Use for:
- streaming output
- task history
- captured stdout/stderr
- diagnostics
Prefer Log for simple text streams and RichLog when rich renderables matter.
Tree
Use for:
- hierarchical data that is not the filesystem
- settings groups
- expandable summaries
SelectionList, OptionList, ListView, Select
Quick guide:
SelectionListfor multi-select checklistsOptionListfor keyboard-first option menusListViewfor custom row widgetsSelectfor compact form dropdowns
Switch, Checkbox, Input, Button, Label, Static
These cover most form and control needs. Reach for them before custom controls.
Widget pairings that work well
DataTable+ detailStaticDirectoryTree+TextAreaInput+DataTable+ statusLabelMarkdownViewer+FooterTabbedContent+ per-tab formsLog+ filterInput
Signals you are missing a built-in
Stop and reconsider if you are about to:
- hand-roll tabs
- hand-roll file trees
- write your own editable multiline text widget
- render a Rich table into
Staticand then emulate selection - manage long-form markdown as many individual
Staticwidgets
Styling advice
Make widget choice do most of the work. Use TCSS for:
- layout
- spacing
- responsive pane arrangement
- semantic states via classes
Do not create custom widgets only to solve a styling problem.