Most of these are importable from @textui/widgets; the resource and document components come from @textui/documents and are marked as such below. The four primitives are the exception - they are built into @textui/core and always available.
The chat components are a package and a category of their own: see Chat. They are imported by name and register nothing, so they are not counted below.
Imported directly, a component works as it is. Calling registerBuiltins(app) is what lets a node graph name'Table' as data and get one.
Two pages apply to all of them: Base props for what every node accepts, and Nodes for writing one as data rather than as JSX.
The four primitives
The layout engine and the painter only ever see these, which is why adding a component costs a function rather than a case in the engine.
Primitive
What it is
box
The container. Flex layout, background, border, title, footer, scroll
text
A run of text. Wraps, truncates, aligns
canvas
Direct cell painting. The escape hatch charts use
spacer
Empty space, greedy when given flex
Every node also accepts role, label, focusable, onKey, onClick, disabled and selected - so a bare box can take focus and handle keys without a hook.
| | |
| — | — |
| ResourcePanel | A place a resource is shown, by whichever renderer is registered for it. |
| TextViewerdocuments | Plain text with a line-number gutter. |
| MarkdownViewerdocuments | Headings, lists, rules, quotes and fenced code. |
| FallbackViewerdocuments | What an unregistered kind gets. |
| ResourceViewdocuments | Displays a resource through the registry. |
| ResourceExplorerdocuments | Browse and open resources. |
| ResourceActionsdocuments | Actions registered for a kind. |
| ResourceOpenWithdocuments | Choose among registered viewers. |
| ResourceBreadcrumbdocuments | The path to a resource. |
| JsonViewerdocuments | JSON source, coloured by the registered highlighter. |
| JsonTreeViewerdocuments | JSON as an expandable structure. |
| CodeEditordocuments | Edit a document buffer, with a caret that has a column. |