Skip to content

组件 Props / Events(自动生成) ​

此文件由 scripts/generate-component-api-docs.ts 自动生成,请勿手改。

目录 ​

T3DViewport ​

源码:src/vue/components/T3DViewport.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是Horizontal position in terminal cells.
ynumber—是Vertical position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Paint and pointer hit-test stacking order.
rendererT3DRenderer—是Pull renderer captured at mount; remount the component to replace it.
pausedbooleanfalse否Stops frame pulling while true.
maxFpsnumberDEFAULT_MAX_FPS否Maximum requested frames per second.
pixelWidthnumberundefined否Requested source width in pixels; TVideo may adapt it for ASCII output.
pixelHeightnumberundefined否Requested source height in pixels; TVideo may adapt it for ASCII output.
fallbackstring"[3D viewport]"否Text displayed before a frame is available or after rendering fails.
styleStyleundefined否Terminal style applied to fallback and ASCII output.
clearbooleantrue否Clears cells underneath each video frame.
interactivebooleantrue否Enables pointer orbit, wheel zoom, and hover motion tracking.
initialYawnumber0否Initial yaw angle in radians, also restored by resetMotion().
initialPitchnumber0否Initial pitch angle in radians, also restored by resetMotion().
autoRotatebooleantrue否Enables continuous yaw rotation when not dragging.
autoRotateSpeednumberDEFAULT_AUTO_ROTATE_SPEED否Automatic yaw rotation speed in radians per second.
pointerSensitivitynumberDEFAULT_POINTER_SENSITIVITY否Drag sensitivity in radians per terminal cell.
initialZoomnumber1否Initial camera zoom, also restored by resetMotion().
minZoomnumberDEFAULT_MIN_ZOOM否Minimum camera zoom accepted from wheel and trackpad gestures.
maxZoomnumberDEFAULT_MAX_ZOOM否Maximum camera zoom accepted from wheel and trackpad gestures.
zoomSensitivitynumberDEFAULT_ZOOM_SENSITIVITY否Zoom impulse per normalized wheel or trackpad unit.

Events ​

名称Payload说明
frameTVideoFrameEventA frame was committed by TVideo.
errorunknownRendering or frame processing failed.
objecthoverT3DHitResult | nullHovered renderer object changed, or cleared to null.
objectselectT3DHitResult | nullClick-locked renderer object changed, or cleared to null.

TAgentTerminalGraphic ​

源码:src/vue/components/TAgentTerminalGraphic.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumberundefined否—
zIndexnumber0否—
contentstring—是—
kindTAgentTerminalGraphicKind"image"否—
fallbackstringundefined否—
styleStyleundefined否—
loadingStyleStyleundefined否—
errorStyleStyleundefined否—
clearbooleantrue否—
finalbooleantrue否—
streamingbooleanfalse否—
rendererTAgentTerminalGraphicRendererundefined否—
loadingTextstring"Rendering terminal graphic..."否—
deferRenderUntilVisiblebooleantrue否—
suspendRawWhileScrollingbooleantrue否—
suspendRenderWhileScrollingbooleantrue否—
scrollingbooleanfalse否—
scrollVersionnumber0否—
placementMoveWithoutClearbooleanfalse否Advanced Kitty-only opt-in for moving an unchanged image via a reusable placement sequence.
preserveRawWhileRenderingbooleanfalse否—
suspendedbooleanfalse否—
retainRawWhileCoveredbooleanfalse否—
ignoreRawCoveragebooleanfalse否—
ignoreSamePlaneRawCoveragebooleanfalse否—
cacheKeystringundefined否—
placementKeystringundefined否—
trace(event: TAgentTerminalGraphicTraceEvent) => voidundefined否—

Events ​

—

TAgentTranscript ​

源码:src/vue/components/TTranscriptView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
sourceTTranscriptDataSource—是—
versionnumber—是—
scrollTopnumberundefined否—
defaultScrollTopnumber0否—
autoStickToBottombooleanfalse否—
selectablebooleantrue否—
wrapbooleanfalse否—
styleStyleundefined否—
hoverStyleStyleundefined否—
focusStyleStyleundefined否—
autoFocusbooleanfalse否—
focusablebooleantrue否—
wheelScrollbooleantrue否—
keyboardRegionsbooleantrue否—
rowScrollModeRowScrollMode"unsafe-full-row"否—

Events ​

名称Payload说明
scroll——
update:scrollTop——
rowClick——
actionClick——
linkClick——
foldToggle——
toolClick——
hoverRegion——

TAnchor ​

源码:src/vue/components/TAnchor.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
leftnumberundefined否—
topnumberundefined否—
rightnumberundefined否—
bottomnumberundefined否—
wnumberundefined否—
hnumberundefined否—
zIndexnumber0否—
focusablebooleanfalse否—
selectablebooleanundefined否—

Events ​

名称Payload说明
clickCapture——
click——
dblclickCapture——
dblclick——
pointerdownCapture——
pointerdown——
pointerupCapture——
pointerup——
pointermoveCapture——
pointermove——
wheelCapture——
wheel——
keydownCapture——
keydown——
keyupCapture——
keyup——
focusCapture——
focus——
blurCapture——
blur——

TAutocompleteInput ​

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber5否Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
modelValuestring—是Controlled component value.
suggestionsreadonly TAutocompleteOption[]() => []否Autocomplete suggestions.
suggestionProviderTAutocompleteSuggestionProviderundefined否Async suggestion provider called with the current input value.
openbooleanundefined否Controlled suggestion popup visibility.
highlightedIndexnumber0否Controlled highlighted suggestion index.
placeholderstring""否Placeholder text shown when the input is empty.
debouncenumber0否Delay before calling an async provider, in milliseconds.
minCharsnumber0否Minimum input length before suggestions are shown or loaded.
filterLocalbooleanfalse否Filters provided suggestions against the input value.
closeOnSelectbooleantrue否Closes suggestions after a suggestion is selected.
loadingTextstring"Loading..."否Text rendered while async loading is pending.
emptyTextstring""否Text rendered when there are no rows or items.
errorTextstring"Unable to load suggestions"否Text rendered when async loading fails.
styleStyleundefined否Base terminal cell style override.
suggestionStyleStyleundefined否Style override for suggestion rows.
activeSuggestionStyleStyle() => ({ inverse: true })否Style override for the active suggestion row.

Events ​

名称Payload说明
update:modelValuestringEmitted when the controlled model value changes.
update:openbooleanEmitted when popup visibility changes.
update:highlightedIndexnumberEmitted when the active autocomplete suggestion changes.
inputstringEmitted for input edits.
changestringEmitted when the component commits a value change.
selectTAutocompleteSelectPayloadEmitted when the active item is selected.
loadErrorTAutocompleteLoadErrorPayloadEmitted when the async suggestion provider rejects; aborted stale requests do not emit.

TBadge ​

源码:src/vue/components/TFeedback.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumberundefined否Width in terminal cells.
valuestring | number—是Text or scalar value rendered by the badge.
toneTFeedbackTone"default"否Semantic color tone.
zIndexnumber0否Render and event ordering within the current plane.
styleStyleundefined否Base terminal cell style override.

Events ​

—

TBox ​

源码:src/vue/components/TBox.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
borderbooleantrue否Draws a border around the component.
titlestring""否Optional title text.
paddingnumber0否Inner padding in terminal cells.
scrollXnumber0否Horizontal content offset in terminal cells.
scrollYnumber0否Vertical content offset in terminal cells.
styleStyleundefined否Base terminal cell style override.
titleStyleStyleundefined否Style override for title text.
clearbooleantrue否Clears the component rectangle before drawing content.

Events ​

名称Payload说明
pointerenterCaptureTerminalPointerEventEmitted when the pointer enters the component. Runs during capture.
pointerenterTerminalPointerEventEmitted when the pointer enters the component.
pointerleaveCaptureTerminalPointerEventEmitted when the pointer leaves the component. Runs during capture.
pointerleaveTerminalPointerEventEmitted when the pointer leaves the component.

Slots ​

名称Props说明
default—Content rendered inside the box content area with origin, clipping, and scroll offsets applied.

TBreadcrumb ​

源码:src/vue/components/TNavigation.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
zIndexnumber0否—
itemsreadonly TBreadcrumbItem[]—是—
separatorstring"/"否—
styleStyleundefined否—
activeStyleStyle() => ({ bold: true })否—
disabledStyleStyle() => ({ dim: true })否—

Events ​

名称Payload说明
selectTBreadcrumbSelectPayload—

TBrowser ​

源码:src/vue/components/TBrowser.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental/browser

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
urlstring—是—
sessionFactoryTBrowserSessionFactory—是—
autoFocusbooleanfalse否—
maxFpsnumber60否—
pixelWidthnumberundefined否—
pixelHeightnumberundefined否—
fallbackstring"[browser requires terminal graphics]"否—
styleStyleundefined否—
clearbooleantrue否—

Events ​

名称Payload说明
readyTBrowserSession—
frameTVideoFrameEvent—
navigatestring—
titleChangestring—
requestAddress——
close——
errorunknown—

TCandlestickChart ​

源码:src/vue/components/TCharts.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否—
candlesreadonly TCandlestickDatum[]—是Candles rendered from left to right; the most recent candles are kept when width is smaller.
labelsreadonly string[]undefined否Labels aligned with candles and shown in hover tooltips.
minnumberundefined否Lower price bound. Defaults to the smallest candle low.
maxnumberundefined否Upper price bound. Defaults to the largest candle high.
styleStyleundefined否—
upStyleStyle() => ({ fg: "greenBright" })否Style used when close is greater than or equal to open.
downStyleStyle() => ({ fg: "redBright" })否Style used when close is less than open.
wickStyleStyleundefined否Optional style override for wick cells.
showAxesbooleantrue否Whether to render axes and price labels when there is enough space.
axisStyleStyle() => ({ fg: "white", dim: true })否Style used for axis lines.
labelStyleStyle() => ({ fg: "whiteBright" })否Style used for axis labels.
xLabelstring""否Label centered under the x axis.
yLabelstring""否Label rendered at the top of the plot area.
startLabelstring""否Left endpoint label for the x axis when xLabel is empty.
endLabelstring""否Right endpoint label for the x axis when xLabel is empty.
showTooltipbooleantrue否Whether pointer hover shows candle values.
hoverStyleStyle() => ({})否Style merged onto the currently hovered candle.
tooltipStyleStyle() => ({ fg: "whiteBright" })否Style used for hover tooltip text.

Events ​

—

TCheckbox ​

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
modelValuebooleanfalse否Controlled component value.
labelstring""否Visible label text.
disabledbooleanfalse否Disables pointer and keyboard activation.
styleStyleundefined否Base terminal cell style override.
checkedStyleStyleundefined否Style used when the checkbox is checked.
disabledStyleStyle() => ({ dim: true })否Style used for disabled content.

Events ​

名称Payload说明
update:modelValuebooleanEmitted when the controlled model value changes.
changebooleanEmitted when the component commits a value change.

TCode ​

源码:src/vue/components/TFeedback.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumberundefined否Width in terminal cells.
valuestring—是Code text rendered inside the code block.
zIndexnumber0否Render and event ordering within the current plane.
styleStyle() => ({ fg: "yellowBright" })否Base terminal cell style override.

Events ​

—

TCommandPalette ​

源码:src/vue/components/TCommandPalette.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
modelValueboolean—是Controlled component value.
titlestring""否Optional title text.
querystringundefined否Search query used by filtering or async providers.
initialQuerystring""否Query used when the command palette opens.
itemsreadonly TCommandPaletteItem[]() => []否Command items rendered and filtered by the palette.
itemsProviderTCommandPaletteItemsProviderundefined否Async command provider called with the current query.
matcherTCommandPaletteMatcherundefined否Custom command matcher.
filterStrategy"substring" | "fuzzy""substring"否Built-in command matching strategy.
selectedIndexnumberundefined否Controlled active item index.
showRowDetailsbooleanfalse否Shows command detail text next to labels.
placeholderstring""否Placeholder text shown when the input is empty.
noMatchesTextstring"No matches"否Text rendered when filtering returns no commands.
loadingTextstring"Loading..."否Text rendered while async loading is pending.
errorTextstring"Unable to load commands"否Text rendered when async loading fails.
hintstring""否Footer hint text.
debouncenumber0否Delay before calling an async provider, in milliseconds.
minQueryLengthnumber0否Minimum query length before async loading runs.
maxVisibleItemsnumberundefined否Maximum number of command rows rendered at once.
closeOnSelectbooleanfalse否Closes the command palette after a command is selected.
resetQueryOnClosebooleanfalse否Resets the query when the palette closes.
wnumber72否Width in terminal cells.
hnumber18否Height in terminal cells.
chromeStyleStyleundefined否Style override for command palette chrome.
inputStyleStyleundefined否Style override for the embedded input.
listStyleStyleundefined否Style override for list rows.
bodyStyleStyleundefined否Style override for dialog body cells.
highlightStyleStyleundefined否Style used for the highlighted row or match.
matchStyleStyleundefined否Style used for matched text.
highlightMatchStyleStyleundefined否Style used for highlighted text while the row is active.
dividerStyleStyleundefined否Style override for dividers.
hintStyleStyleundefined否Style override for hint text.
detailStyleStyleundefined否Style override for detail text.
emptyStyleStyleundefined否Style used when rendering an empty state.

Events ​

名称Payload说明
update:modelValuebooleanEmitted when the controlled model value changes.
update:querystringEmitted when the controlled query changes.
update:selectedIndexnumberEmitted when the controlled active index changes.
selectTCommandPaletteSelectPayloadEmitted when the active item is selected.
loadErrorTCommandPaletteLoadErrorPayloadEmitted when the async command provider rejects; aborted stale requests do not emit.
closevoidEmitted when the component requests to close.

TContextMenu ​

源码:src/vue/components/TOverlay.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
modelValueboolean—是—
xnumber—是Caller-owned x position; no viewport clamp or flip placement is applied.
ynumber—是Caller-owned y position; no viewport clamp or flip placement is applied.
wnumber24否—
zIndexnumber20否—
itemsreadonly TContextMenuItem[]—是—
selectedIndexnumberundefined否—
closeOnOutsidebooleantrue否—
styleStyleundefined否—
activeStyleStyle() => ({ inverse: true })否—
disabledStyleStyle() => ({ dim: true })否—

Events ​

名称Payload说明
update:modelValueboolean—
update:selectedIndexnumber—
selectTContextMenuSelectPayload—
close——

TContributionGraph ​

源码:src/vue/components/TCharts.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumberundefined否Width in terminal cells. Defaults to the rendered graph width.
hnumberundefined否Height in terminal cells. Defaults to the row count plus a tooltip row when tooltips are enabled.
zIndexnumber0否—
valuesreadonly number[]—是Numeric samples rendered column-major from top to bottom.
rowsnumber7否Number of rows in each heatmap column.
columnsnumberundefined否Number of columns to render. Defaults to enough columns for the values.
maxnumberundefined否Maximum sample value used for level mapping. Defaults to the largest positive value.
labelsreadonly string[]undefined否Labels aligned with values and shown in hover tooltips.
unitstring""否Unit appended to hover tooltip values.
showTooltipbooleantrue否Whether pointer hover shows a value tooltip.
emptyStyleStyle() => ({ fg: "blackBright", dim: true })否Empty cells and surrounding clear area style.
levelStylesreadonly Style[]() => DEFAULT_HEATMAP_LEVEL_STYLES否Positive value styles ordered from low to high intensity.
cellstring"■"否Glyph used for each heatmap cell.
gapnumber1否Horizontal gap between columns in terminal cells.
hoverStyleStyle() => ({})否Style merged onto the currently hovered heatmap cell.
tooltipStyleStyle() => ({ fg: "whiteBright" })否Style used for hover tooltip text.
styleStyleundefined否—

Events ​

—

TDataTable ​

源码:src/vue/components/TDataTable.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
columnsreadonly TTableColumn[]—是Table column definitions.
rowsreadonly TTableRow[]—是TDataTable can accept a controlled viewport offset through scrollTop. It is
still non-virtual: rows are sorted/filtered in memory and only the visible
slice is passed to TTable.
rowKeystring | ((row: TTableRow, index: number) => unknown)undefined否Row key field or resolver.
selectedRowKeyunknownundefined否Controlled selected row key.
selectedRowKeysreadonly unknown[]undefined否Controlled selected row keys for multi-select tables.
scrollTopnumberundefined否Controlled top row offset.
sortBystring""否Sorts by the raw row value at this key; column format only affects display and filtering.
sortDirectionTDataTableSortDirection"asc"否Controlled sort direction.
sortablebooleanfalse否Enables sortable column header interactions.
manualSortbooleanfalse否Disables built-in sorting while keeping sort events controlled by the host.
sorterTDataTableSorterundefined否Custom row comparison function.
filterstring""否Controlled filter query.
filterablebooleanfalse否Enables built-in row filtering.
manualFilterbooleanfalse否Disables built-in filtering while keeping filter state host-owned.
filterPredicateTDataTableFilterPredicateundefined否Custom row filter predicate.
selectablebooleanfalse否Enables row selection.
selectionModeTDataTableSelectionMode"single"否Row selection mode.
borderbooleanfalse否Draws a border around the component.
styleStyleundefined否Base terminal cell style override.
headerStyleStyleundefined否Style override for table header cells.
borderStyleStyleundefined否Style override for border cells.
selectedStyleStyleundefined否Style used for selected rows or nodes.
activeStyleStyleundefined否Style used for the active item or row.
emptyTextstring"No rows"否Text rendered when there are no rows or items.

Events ​

名称Payload说明
update:selectedRowKeyunknownEmitted when the selected row key changes.
update:selectedRowKeysunknown[]Emitted when selected row keys change.
update:scrollTopnumberEmitted when the top visible row offset should change.
update:sortBystringEmitted when the sorted column key changes.
update:sortDirectionTDataTableSortDirectionEmitted when the sort direction changes.
sortChangeTDataTableSortChangePayloadEmitted when table sort state changes.
rowSelectTDataTableRowSelectPayloadEmitted when a data table row is selected; index is viewport-local, dataIndex is filtered/sorted, and originalIndex is the input row index.

TDebugOverlay ​

源码:src/vue/components/TDebugOverlay.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
mode"focus" | "all""focus"否—
panelbooleantrue否—
maxRectsnumber40否—
zIndexnumber90否—

Events ​

—

TDialog ​

源码:src/vue/components/TDialog.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
modelValueboolean—是Controlled component value.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
titlestring""否Optional title text.
paddingnumber1否Inner padding in terminal cells.
zIndexnumber1000否Render and event ordering within the current plane.
styleStyleundefined否Base terminal cell style override.
titleStyleStyleundefined否Style override for title text.
contentStyleStyleundefined否Style override for dialog or popover content cells.
backdropStyleStyleundefined否Style override for backdrop cells.
placementPlacement"center"否Dialog placement within the current layout.
offsetXnumber0否Horizontal placement offset in cells.
offsetYnumber0否Vertical placement offset in cells.
backdropbooleantrue否Renders a backdrop behind the dialog.
closeOnBackdropbooleantrue否Closes the dialog when the backdrop is clicked.
closeOnEscbooleantrue否Closes the dialog on Escape.
closeOnBlurbooleanfalse否Emits close when focus leaves the component.
teleportbooleanfalse否Mounts the dialog into the overlay runtime plane.
tabMode"cycle" | "wrapFromButtons""cycle"否Keyboard Tab behavior inside the dialog.
buttonsDialogButton[]() => []否Dialog footer buttons.
closeOnConfirmbooleantrue否Closes the dialog after a footer button confirms.

Events ​

名称Payload说明
update:modelValuebooleanEmitted when the controlled model value changes.
closevoidEmitted when the component requests to close.
focusvoidEmitted when the component receives focus.
blurvoidEmitted when the component loses focus.
keydownTerminalKeyboardEventEmitted for keydown events.
confirmDialogButton & { index: number }Emitted when a focused action is confirmed.

Slots ​

名称Props说明
default—Dialog body content rendered inside the content rect before optional footer buttons.

TDivider ​

源码:src/vue/components/TFeedback.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
titlestring""否Optional title text.
zIndexnumber0否Render and event ordering within the current plane.
styleStyleundefined否Base terminal cell style override.

Events ​

—

TerminalProvider ​

源码:src/vue/components/TerminalProvider.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
colsnumber—是Terminal column count.
rowsnumber—是Terminal row count.
widthProviderWidthProvider"default"否Cell width provider used by the terminal buffer.
defaultStyleStyle() => ({})否Default terminal cell style for descendants.
themeTuiThemeOverridesundefined否Theme token overrides for component defaults.
autoResizebooleanfalse否Resizes the terminal from the host element when enabled.
minColsnumber1否Minimum column count used by auto resize.
minRowsnumber1否Minimum row count used by auto resize.
recordEvents((e: TerminalEventRecord) => void) | undefinedundefined否Optional event recorder callback.
inputPluginsreadonly TInputPlugin[]() => [defaultTInputHostPlugin]否Input plugins provided to descendant text inputs.
pathPickerProviderPathPickerProviderundefined否Path provider injected into descendant path pickers.
linkOpenerTerminalLinkOpenerLikeundefined否Host link opener used by components with host-owned activation.
debugImebooleanfalse否Enables IME debugging output.
debugTracebooleanfalse否Enables runtime trace logging.
domRendererOptionsDomRendererOptionsundefined否DOM renderer options used by TerminalProvider.
clipboardClipboardApiundefined否Clipboard implementation used for terminal selection copy.
selectionTerminalProviderSelectionConfigfalse否Terminal cell selection configuration.

Events ​

名称Payload说明
selectionCopyTerminalSelectionCopyPayloadEmitted after terminal selection copy.

Slots ​

名称Props说明
default—Terminal component tree rendered inside the provider runtime context.

TFlex ​

源码:src/vue/components/TFlex.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
directionTFlexDirection"row"否—
gapnumber0否—
rowGapnumberundefined否—
columnGapnumberundefined否—
paddingnumber0否—
paddingXnumberundefined否—
paddingYnumberundefined否—
paddingTopnumberundefined否—
paddingRightnumberundefined否—
paddingBottomnumberundefined否—
paddingLeftnumberundefined否—
wrapbooleanfalse否—
alignItemsTFlexAlign"stretch"否—
justifyContentTFlexJustify"start"否—
alignContentTFlexAlignContent"start"否—
zIndexnumber0否—

Events ​

—

Slots ​

名称Props说明
default—Flex item subtree measured and positioned inside the flex container.

TFlexItem ​

源码:src/vue/components/TFlex.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
grownumber0否—
shrinknumber1否—
basisTFlexSizeundefined否—
wTFlexSizeundefined否—
widthTFlexSizeundefined否—
hTFlexSizeundefined否—
heightTFlexSizeundefined否—
minWidthTFlexSizeundefined否—
minHeightTFlexSizeundefined否—
maxWidthTFlexSizeundefined否—
maxHeightTFlexSizeundefined否—
measureTFlexMeasureundefined否—
ordernumber0否—
zIndexnumber0否—
marginnumber0否—
marginXnumberundefined否—
marginYnumberundefined否—
marginTopnumberundefined否—
marginRightnumberundefined否—
marginBottomnumberundefined否—
marginLeftnumberundefined否—
alignSelfTFlexAlignundefined否—

Events ​

—

Slots ​

名称Props说明
default{ rect: Rect }Item content rendered inside the computed child rect.

TFlow ​

源码:src/vue/components/TFlow.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
itemsunknown[]—是—
directionDirection"vertical"否—
gapnumber0否—
itemSizenumber1否—
zIndexnumber0否—

Events ​

—

TForm ​

源码:src/vue/components/TForm.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
modelTFormModel—是—
rulesRecord<string, TFormRule>() => ({})否—
disabledbooleanfalse否—
readOnlybooleanfalse否Provides a read-only hint to custom form field consumers; built-in controls do not automatically consume it.
submitOnEnterbooleanfalse否—

Events ​

名称Payload说明
submitTFormSubmitPayload—
validationRecord<string, string>—

Slots ​

名称Props说明
default—Form field subtree rendered with TForm context provided to descendants.

TFormField ​

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
namestring""否Field name used by form context.
labelstring""否Visible label text.
helpstring""否Help text rendered below the field.
errorstring""否Error text rendered below the field.
requiredbooleanfalse否Marks the field label as required.
disabledbooleanfalse否Disables pointer and keyboard activation.
styleStyleundefined否Base terminal cell style override.
labelStyleStyleundefined否Style override for label text.
helpStyleStyleundefined否Style override for help text.
errorStyleStyleundefined否Style override for error text.

Events ​

—

Slots ​

名称Props说明
default—Field control content rendered between the label and help/error row.

TInput ​

源码:src/vue/components/TInput.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber1否Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
modelValuestring—是Controlled component value.
cursorToEndOnExternalUpdatebooleanfalse否Moves the cursor to the end after external model updates.
cursorToEndOnFirstFocusbooleanfalse否Moves the cursor to the end on first focus.
placeholderstring""否Placeholder text shown when the input is empty.
placeholderWhenFocusedbooleanfalse否Placeholder text used while the input has focus.
styleStyleundefined否Base terminal cell style override.
autoFocusbooleanfalse否Requests focus when the component becomes visible.
cursorBlinkbooleantrue否Enables cursor blink rendering.
cursorShape"block" | "underline" | "bar""block"否Cursor glyph shape.
blinkIntervalnumber500否Cursor blink interval in milliseconds.
promptSuggestionsreadonly PromptSuggestion[]() => []否Prompt popup suggestions.
promptTriggerstring"/"否Prompt popup trigger character.
promptTriggersreadonly string[]undefined否Prompt popup trigger characters.
promptMaxItemsnumber6否Maximum prompt popup rows.
promptAlign"input" | "center""input"否Prompt popup alignment.
promptSelectedStyleStyleundefined否Style override for the active prompt suggestion.
promptPopupStyleStyleundefined否Style override for the prompt popup body.
promptPopupBorderStyleStyleundefined否Style override for the prompt popup border.
promptPopupMatchStyleStyleundefined否Style override for prompt match highlights.
skillTriggerstring""否Trigger used for skill suggestions.
skillSuggestionsreadonly PromptSuggestion[]undefined否Skill suggestions shown in the prompt popup.
skillHighlightStyleStyleundefined否Style override for highlighted skill chips.
mentionTriggerstring"@"否Trigger used for path or mention suggestions.
mentionWorkspacestring""否Workspace root used by mention providers.
mentionModePathPickMode"file"否Mention provider mode.
mentionShowHiddenbooleanfalse否Includes hidden paths in mention suggestions.
mentionSuggestionsreadonly PromptSuggestion[]() => []否Mention suggestions supplied by the host.
mentionMaxItemsnumber8否Maximum mention rows.
mentionChipStyleStyleundefined否Style override for mention chips.
multilineChipStyleStyleundefined否Style override for multiline chips.
dedupeMentionsbooleantrue否Removes duplicate mention entries.
collectMentionsbooleanfalse否Collects mention values from committed input.
mentionsreadonly string[]() => []否Controlled collected mention values.
collapseMultilinebooleanfalse否Collapses multiline pasted text into chips.
collapseMultilineLinesnumber3否Collapses pasted text into one multiline chip when its line count exceeds this value.
multilineTextsreadonly string[]() => []否Controlled multiline chip text values.
secretbooleanfalse否Masks input text when enabled.
maskCharstring"•"否Character used to mask secret input.
submitOnEnterbooleantrue否Emits change on Enter.
pluginsreadonly TInputPlugin[]() => []否Input plugins attached to this input.
pasteImageHandler() => Promise<string | null> | string | nullundefined否Host handler for pasted images.
filePasteHandler(absPath: string) => Promise<string | null> | string | nullundefined否Host handler for pasted files.

Events ​

名称Payload说明
update:modelValuestringEmitted when the controlled model value changes.
inputstringEmitted for input edits.
changestringEmitted when the component commits a value change.
keydownTerminalKeyboardEventEmitted for keydown events.
focusvoidEmitted when the component receives focus.
blurvoidEmitted when the component loses focus.
pointerenterTerminalPointerEventEmitted when the pointer enters the component.
pointerleaveTerminalPointerEventEmitted when the pointer leaves the component.
update:mentionsreadonly string[]Emitted when collected mentions change.
mentionClick(absPath: string, event: TerminalPointerEvent)Emitted when a rendered mention chip is clicked.
update:multilineTextsreadonly string[]Emitted when multiline chip text values change.
multilineClicknumberEmitted when a multiline chip is clicked.
validationError{ reason: string }Emitted when input validation rejects a host action.

TInputBox ​

源码:src/vue/components/TInputBox.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
titlestring""否—
paddingnumber0否—
modelValuestring—是—
placeholderstring""否—
styleStyleundefined否—
autoFocusbooleanfalse否—
pluginsreadonly TInputPlugin[]() => []否—
cursorBlinkbooleantrue否—
cursorShape"block" | "underline" | "bar""block"否—
blinkIntervalnumber500否—

Events ​

名称Payload说明
update:modelValue——
input——
change——
keydown——
focus——
blur——

TJsonEditor ​

源码:src/vue/components/TJsonEditor.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber8否—
zIndexnumber0否—
modelValuestring—是—
placeholderstring""否—
styleStyleundefined否—
showIndentGuidesbooleantrue否—
indentSizenumber2否—
guideColorsreadonly AnsiColorName[]() => [...DEFAULT_GUIDE_COLORS]否—
autoFocusbooleanfalse否—
cursorToEndOnFirstFocusbooleantrue否—
cursorToEndOnExternalUpdatebooleantrue否—
submitOnEnterbooleanfalse否—

Events ​

名称Payload说明
update:modelValue——
keydown——
focus——
blur——
undo——
redo——
lintChange——
validationError——

TKeyHint ​

源码:src/vue/components/TNavigation.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumberundefined否—
zIndexnumber0否—
combostring—是—
labelstring—是—
styleStyleundefined否—
comboStyleStyle() => ({ inverse: true })否—

Events ​

—

TLineChart ​

源码:src/vue/components/TCharts.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否—
valuesreadonly number[]—是Numeric samples rendered across the chart width.
labelsreadonly string[]undefined否Labels aligned with values and shown in hover tooltips.
unitstring""否Unit appended to hover y values.
minnumberundefined否Lower domain bound. Defaults to the smallest sample.
maxnumberundefined否Upper domain bound. Defaults to the largest sample.
styleStyleundefined否—
lineStyleStyle() => ({ fg: "cyanBright" })否Style used for line glyphs.
showAxesbooleantrue否Whether to render axes and domain labels when there is enough space.
axisStyleStyle() => ({ fg: "white", dim: true })否Style used for axis lines.
labelStyleStyle() => ({ fg: "whiteBright" })否Style used for axis labels.
xLabelstring""否Label centered under the x axis.
yLabelstring""否Label rendered at the top of the plot area.
startLabelstring""否Left endpoint label for the x axis when xLabel is empty.
endLabelstring""否Right endpoint label for the x axis when xLabel is empty.
showTooltipbooleantrue否Whether pointer hover shows point values.
hoverStyleStyle() => ({ fg: "whiteBright", bold: true })否Style merged onto the currently hovered point.
tooltipStyleStyle() => ({ fg: "whiteBright" })否Style used for hover tooltip text.

Events ​

—

源码:src/vue/components/TLink.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumberundefined否Width in terminal cells.
hnumber1否Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
hrefstring—是Link target to render and activate.
labelstringundefined否Visible label text.
styleStyleundefined否Base terminal cell style override.
hoverStyleStyleundefined否Style applied while the pointer hovers the link.
focusStyleStyleundefined否Style applied while the link has keyboard focus.
activeStyleStyleundefined否Style used for the active item or row.
disabledbooleanfalse否Disables pointer and keyboard activation.
visitedbooleanfalse否Marks the link as already visited for styling.
openModeTLinkOpenMode"host"否Link activation mode.
activationKeysreadonly string[]() => DEFAULT_ACTIVATION_KEYS否Keyboard keys that activate the link.
modifierClickTLinkModifierClick"none"否Pointer modifier required for click activation.
autoFocusbooleanfalse否Requests focus when the component becomes visible.

Events ​

名称Payload说明
activateTLinkActivatePayloadEmitted when the link is activated.
openTLinkOpenPayloadEmitted when the host opener accepts a link open request.
invalidHrefTLinkInvalidHrefPayloadEmitted when a link href is rejected by the sanitizer.
clickTerminalPointerEventEmitted for click events.
keydownTerminalKeyboardEventEmitted for keydown events.
focusTerminalBaseEventEmitted when the component receives focus.
blurTerminalBaseEventEmitted when the component loses focus.

TLinkifyText ​

源码:src/vue/components/TLinkifyText.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
valuestring—是Text scanned for links and rendered into terminal cells.
wnumberundefined否Width in terminal cells.
hnumberundefined否Height in terminal cells.
styleStyleundefined否Base terminal cell style override.
linkStyleStyleundefined否Style applied to detected link segments.
clearbooleantrue否Clears the component rectangle before drawing content.
wrapbooleanfalse否Wraps text to the available cell width.
protocolsreadonly TLinkifyProtocol[]undefined否URL protocols accepted by linkification.
allowRelativebooleanfalse否Allows relative hrefs in detected link segments.
maxUrlLengthnumberundefined否Maximum detected URL length.

Events ​

—

TList ​

源码:src/vue/components/TList.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
itemsstring[]—是List rows rendered by the component.
itemVersionnumber0否External version key for item changes that keep array identity stable.
modelValuenumber0否Controlled component value.
styleStyleundefined否Base terminal cell style override.
autoFocusbooleanfalse否Requests focus when the component becomes visible.
closeOnBlurbooleanfalse否Emits close when focus leaves the component.

Events ​

名称Payload说明
update:modelValuenumberEmitted when the controlled model value changes.
change{ index: number; value: string }Emitted when the component commits a value change.
scrollnumberEmitted when the visible scroll offset changes.
closevoidEmitted when the component requests to close.
focusvoidEmitted when the component receives focus.
blurvoidEmitted when the component loses focus.
keydownTerminalKeyboardEventEmitted for keydown events.

TLogLinksPanel ​

源码:src/vue/components/TLogLinksPanel.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
linksreadonly TLogLinkPanelItem[]() => []否—
activeIndexnumber-1否—
styleStyleundefined否—
activeStyleStyle() => ({ inverse: true })否—
currentStyleStyle() => ({ bold: true })否—
hrefStyleStyle() => ({ underline: true })否—
disabledStyleStyle() => ({ dim: true })否—
showLineNumbersbooleantrue否—
showHrefbooleantrue否—
focusablebooleantrue否—

Events ​

名称Payload说明
select——
activate——
activeChange——
focus——
blur——
keydown——

TLogMinimap ​

源码:src/vue/components/TLogMinimap.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
metricsTLogMinimapMetrics | nullnull否—
markersreadonly TLogMinimapMarker[]() => []否—
densityreadonly TLogMinimapDensityBucket[]() => []否—
styleStyleundefined否—
densityStyleStyleundefined否—
markerStyleStyleundefined否—
currentMarkerStyleStyleundefined否—
viewportStyleStyleundefined否—
estimatedStyleStyleundefined否—
showMarkersbooleantrue否—
showDensitybooleantrue否—
showViewportbooleantrue否—

Events ​

名称Payload说明
scrollTo——
markerClick——

TLogScrollbar ​

源码:src/vue/components/TLogScrollbar.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
hnumber—是—
zIndexnumber0否—
metricsTLogScrollbarMetrics | nullnull否—
styleStyleundefined否—
thumbStyleStyleundefined否—
trackStyleStyleundefined否—
measuringStyleStyleundefined否—
markersreadonly TLogScrollbarMarker[]() => []否—
markerStyleStyle() => ({ fg: "yellowBright" })否—
currentMarkerStyleStyle() => ({ fg: "redBright", bold: true })否—
showMarkersbooleantrue否—
showArrowsbooleanfalse否—

Events ​

名称Payload说明
scrollTo——
scrollBy——
markerClick——

TLogSearchBar ​

源码:src/vue/components/TLogSearchBar.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
zIndexnumber0否—
stateTLogSearchBarState—是—
placeholderstring"Search…"否—
styleStyleundefined否—
inputStyleStyleundefined否—
activeStyleStyle() => ({ inverse: true })否—
errorStyleStyle() => ({ fg: "redBright", bold: true })否—
disabledStyleStyle() => ({ dim: true })否—
toggleStyleStyleundefined否—
focusablebooleantrue否—
showModeTogglebooleantrue否—
showCaseTogglebooleantrue否—
showWholeWordTogglebooleantrue否—
showCountbooleantrue否—
showNavigationbooleantrue否—

Events ​

名称Payload说明
update——
update:query——
update:mode——
update:caseSensitive——
update:wholeWord——
previous——
next——
clear——
focus——
blur——
keydown——

TLogSearchPager ​

源码:src/vue/components/TLogSearchPager.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
zIndexnumber0否—
stateTLogSearchPagerState | nullnull否—
styleStyleundefined否—
activeStyleStyleundefined否—
disabledStyleStyle() => ({ dim: true })否—
errorStyleStyle() => ({ fg: "redBright", bold: true })否—
showCountbooleantrue否—

Events ​

名称Payload说明
previousPage——
nextPage——
pageChange——

TLogSearchResults ​

源码:src/vue/components/TLogSearchResults.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
resultsreadonly TLogSearchResultItem[]() => []否—
activeIndexnumber-1否—
styleStyleundefined否—
activeStyleStyle() => ({ inverse: true })否—
matchStyleStyle() => ({ underline: true })否—
currentStyleStyle() => ({ bold: true })否—
showLineNumbersbooleantrue否—
focusablebooleantrue否—

Events ​

名称Payload说明
select——
activeChange——
keydown——
focus——
blur——

TLogView ​

源码:src/vue/components/TLogView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
sourceTLogDataSource—是—
versionnumber—是—
scrollTopnumberundefined否—
defaultScrollTopnumberundefined否—
styleStyleundefined否—
autoFocusbooleanfalse否—
selectablebooleantrue否—
autoStickToBottombooleantrue否—
overscannumber2否—
wrapbooleanfalse否—
visualIndexMode"estimated" | "exact""estimated"否—
visualIndexOptionsTLogViewVisualIndexOptionsundefined否—
ansibooleanfalse否—
linksbooleanfalse否Parses OSC8 links only with ansi=true; OSC8 links preserve parsed ANSI style and
do not inherit TLink theme defaults.
linkifyboolean | TLinkifyOptionsfalse否Plain-text URL linkification for ansi=false rows; generated links inherit TLink
theme defaults before linkStyle.
linkStyleStyleundefined否Link style override. OSC8 defaults to underline-only over parsed ANSI style;
linkify also inherits TLink theme defaults.
keyboardLinksbooleanfalse否—
linkFocusStyleStyle() => ({ inverse: true })否—
searchQuerystring""否—
searchOptionsTLogViewSearchOptionsundefined否—
highlightMatchesbooleantrue否—
matchStyleStyle() => ({ inverse: true })否—
currentMatchStyleStyle() => ({ inverse: true, bold: true })否—
rowScrollModeRowScrollMode"off"否—

Events ​

名称Payload说明
scroll——
update:scrollTop——
update:searchQuery——
search——
searchMatch——
searchMarkers——
linkClick——
linkFocus——
linkActivate——
visualIndex——
focus——
blur——
keydown——

TLogVirtualLinksPanel ​

源码:src/vue/components/TLogVirtualLinksPanel.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
linksreadonly TLogLinkPanelItem[]() => []否—
modelValuenumber-1否—
styleStyleundefined否—
activeStyleStyleundefined否—
showLineNumbersbooleantrue否—
rowScrollModeRowScrollMode"off"否—

Events ​

名称Payload说明
update:modelValue——
activeChange——
select——
activate——
focus——
blur——
keydown——
scroll——

TLogVirtualSearchResults ​

源码:src/vue/components/TLogVirtualSearchResults.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
itemCountnumber—是—
itemVersionnumber—是—
getItem(index: number) => TLogSearchResultItem | null—是—
modelValuenumber-1否—
styleStyleundefined否—
activeStyleStyleundefined否—
showLineNumbersbooleantrue否—
rowScrollModeRowScrollMode"off"否—

Events ​

名称Payload说明
update:modelValue——
activeChange——
select——
focus——
blur——
keydown——
scroll——

TMarkdownText ​

源码:src/vue/components/TMarkdownText.ts

API maturity: Public

Import: @simon_he/vue-tui/markdown

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
contentstring—是Markdown source rendered into terminal visual rows.
wnumber—是Width in terminal cells.
hnumberundefined否Height in terminal cells.
styleStyleundefined否Base terminal cell style override.
finalbooleantrue否Parses the markdown as a complete document when enabled.
streamingbooleanfalse否Coalesces rapid content updates into frame-scheduled markdown rebuilds.
clearbooleantrue否Clears the component rectangle before drawing content.
customHtmlTagsreadonly string[]undefined否Additional HTML tag names accepted by the markdown parser.
themeTuiMarkdownThemeOverridesundefined否Markdown theme token overrides for parsed blocks and inline segments.
imageRendererTuiMarkdownImageResolverundefined否Optional resolver for markdown image payloads before terminal graphics rendering.
imageMinWidthnumberundefined否Minimum markdown image render width in terminal cells.
imageMaxWidthnumberundefined否Maximum markdown image render width in terminal cells.
imageMinHeightnumberundefined否Minimum markdown image render height in terminal cells.
imageMaxHeightnumberundefined否Maximum markdown image render height in terminal cells.
imagePreserveAspectRatiobooleantrue否Preserves markdown image aspect ratio while fitting width and height bounds.
mathImagesbooleantrue否Renders markdown math as terminal graphics images when the terminal supports it.
mathCellWidthPxnumberundefined否Terminal cell width in pixels used to map rendered formulas to cells.
mathCellHeightPxnumberundefined否Terminal cell height in pixels used to map rendered formulas to cells.
mathScalenumberundefined否Rasterization DPI scale for rendered formulas (does not change cell size).
mathColorstringundefined否Hex color used for rendered formula glyphs; defaults to the text foreground.
mathMaxWidthCellsnumberundefined否Maximum width in terminal cells for block-level formulas before they are scaled down.
mathBaselineRationumberundefined否Inline formula baseline position as a fraction of cell height, used to align formulas with text.
imageActionsbooleanfalse否Enables pointer actions for rendered markdown images.
mathActionsbooleanfalse否Enables pointer actions for rendered or raw markdown math syntax.
linkActionsbooleanfalse否Enables pointer actions for rendered markdown links.
imageOcclusionRectsreadonly Rect[]undefined否Terminal rectangles that markdown image layout treats as unavailable for graphics placement.

Events ​

名称Payload说明
imageActionTuiMarkdownImageActionPayloadEmitted when imageActions is enabled and a markdown image action is selected.
mathActionTuiMarkdownMathActionPayloadEmitted when mathActions is enabled and a markdown math action is selected.
linkActionTuiMarkdownLinkActionPayloadEmitted when linkActions is enabled and a markdown link action is selected.

TMermaid ​

源码:src/vue/components/TMermaidText.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumberundefined否—
zIndexnumber0否—
contentstring""否—
codestringundefined否—
styleStyleundefined否—
loadingStyleStyleundefined否—
errorStyleStyleundefined否—
clearbooleantrue否—
finalbooleantrue否—
streamingbooleanfalse否—
asciibooleanfalse否—
paddingXnumberundefined否—
paddingYnumberundefined否—
boxBorderPaddingnumberundefined否—
optionsTMermaidAsciiOptionsundefined否—
rendererTMermaidRendererundefined否—
isTransientErrorTMermaidTransientErrorClassifierundefined否—
shouldRenderSourceTMermaidRenderEligibilityundefined否—
loadingTextstring"Rendering Mermaid diagram..."否—
incompleteTextstring"Waiting for complete Mermaid diagram..."否—
missingDependencyTextstring"Install the Mermaid renderer package and use TMermaidText from @simon_he/vue...否—
errorTextstring"Mermaid render failed"否—
showErrorDetailsbooleantrue否—
boxbooleantrue否—
titlestring"mermaid"否—
copyButtonbooleantrue否—
copyTextstring"copy"否—
copiedTextstring"copied"否—
renderTimeoutMsnumberDEFAULT_MERMAID_RENDER_TIMEOUT_MS否—
maxRenderSourceCharsnumberDEFAULT_MERMAID_MAX_RENDER_SOURCE_CHARS否—
maxRenderSourceLinesnumberDEFAULT_MERMAID_MAX_RENDER_SOURCE_LINES否—
copiedDurationMsnumberDEFAULT_MERMAID_COPIED_DURATION_MS否—

Events ​

名称Payload说明
copyTMermaidCopyPayload—

TMermaidText ​

源码:src/vue/components/TMermaidText.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumberundefined否—
zIndexnumber0否—
contentstring""否—
codestringundefined否—
styleStyleundefined否—
loadingStyleStyleundefined否—
errorStyleStyleundefined否—
clearbooleantrue否—
finalbooleantrue否—
streamingbooleanfalse否—
asciibooleanfalse否—
paddingXnumberundefined否—
paddingYnumberundefined否—
boxBorderPaddingnumberundefined否—
optionsTMermaidAsciiOptionsundefined否—
rendererTMermaidRendererundefined否—
isTransientErrorTMermaidTransientErrorClassifierundefined否—
shouldRenderSourceTMermaidRenderEligibilityundefined否—
loadingTextstring"Rendering Mermaid diagram..."否—
incompleteTextstring"Waiting for complete Mermaid diagram..."否—
missingDependencyTextstring"Install the Mermaid renderer package and use TMermaidText from @simon_he/vue...否—
errorTextstring"Mermaid render failed"否—
showErrorDetailsbooleantrue否—
boxbooleantrue否—
titlestring"mermaid"否—
copyButtonbooleantrue否—
copyTextstring"copy"否—
copiedTextstring"copied"否—
renderTimeoutMsnumberDEFAULT_MERMAID_RENDER_TIMEOUT_MS否—
maxRenderSourceCharsnumberDEFAULT_MERMAID_MAX_RENDER_SOURCE_CHARS否—
maxRenderSourceLinesnumberDEFAULT_MERMAID_MAX_RENDER_SOURCE_LINES否—
copiedDurationMsnumberDEFAULT_MERMAID_COPIED_DURATION_MS否—

Events ​

名称Payload说明
copyTMermaidCopyPayload—

TMultilineModal ​

源码:src/vue/components/TMultilineModal.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
visibleboolean—是—
contentstring—是—
titlestring"Multiline Text"否—
styleStyleundefined否—
zIndexnumber1000否—

Events ​

名称Payload说明
close——

TPasswordInput ​

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber1否Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
modelValuestring—是Controlled component value.
placeholderstring""否Placeholder text shown when the input is empty.
styleStyleundefined否Base terminal cell style override.
autoFocusbooleanfalse否Requests focus when the component becomes visible.

Events ​

名称Payload说明
update:modelValuestringEmitted when the controlled model value changes.
inputstringEmitted for input edits.
changestringEmitted when the component commits a value change.

TPathPicker ​

源码:src/vue/components/TPathPicker.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
workspacestring—是—
modePathPickMode"any"否—
modelValuestring—是—
placeholderstring""否—
styleStyleundefined否—
inputStyleStyleundefined否—
activeStyleStyleundefined否—
matchStyleStyleundefined否—
autoFocusbooleanfalse否—
showHiddenbooleanfalse否—
maxSuggestionsnumber50否—
providerPathPickerProviderundefined否—

Events ​

名称Payload说明
update:modelValue——
select——
invalid——
keydown——
focus——
blur——

TPieChart ​

源码:src/vue/components/TCharts.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否—
valuesreadonly number[]—是Segment values rendered clockwise from the top.
labelsreadonly string[]undefined否Labels aligned with segment values and shown in the legend.
styleStyleundefined否—
segmentStylesreadonly Style[]() => DEFAULT_PIE_SEGMENT_STYLES否Segment styles cycled when there are more segments than styles.
cellstring"█"否Glyph used for filled pie cells.
showLegendbooleantrue否Whether to render a label/value/percent legend when there is enough space.
legendStyleStyle() => ({ fg: "whiteBright" })否Style used for legend text.

Events ​

—

TPopover ​

源码:src/vue/components/TOverlay.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
modelValueboolean—是—
xnumber—是Caller-owned x position; no viewport clamp or flip placement is applied.
ynumber—是Caller-owned y position; no viewport clamp or flip placement is applied.
wnumber—是—
hnumber—是—
zIndexnumber15否—
titlestring""否—
contentstring""否—
styleStyleundefined否—
contentStyleStyleundefined否—

Events ​

—

TProgress ​

源码:src/vue/components/TFeedback.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
zIndexnumber0否—
valuenumber—是—
maxnumber100否—
labelstring""否—
showPercentbooleantrue否—
styleStyleundefined否—
barStyleStyleundefined否—

Events ​

—

TRadioGroup ​

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
modelValuestring""否Controlled component value.
optionsreadonly TRadioOption[]—是Options rendered by the control.
styleStyleundefined否Base terminal cell style override.
activeStyleStyle() => ({ inverse: true })否Style used for the active item or row.
disabledStyleStyle() => ({ dim: true })否Style used for disabled content.

Events ​

名称Payload说明
update:modelValuestringEmitted when the controlled model value changes.
changestringEmitted when the component commits a value change.

TRenderLayer ​

源码:src/vue/components/TRenderLayer.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
zIndexnumber0否—

Events ​

—

TRenderPlane ​

源码:src/vue/components/TRenderPlane.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
planeTerminalRenderPlane"default"否—

Events ​

—

TRouterView ​

源码:src/vue/router/RouterView.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
routesTerminalRouteRecord[]—是—
forceRemountbooleantrue否—

Events ​

—

TSelect ​

源码:src/vue/components/TSelect.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
optionsreadonly SelectOption[]() => []否Options rendered by the control.
optionProviderTSelectOptionProviderundefined否Async option provider called with the current query and an AbortSignal for stale requests.
querystringundefined否Search query used by filtering or async providers.
modelValueTSelectModelValue0否Controlled component value.
valueModeTSelectValueMode"index"否Model value shape emitted by the select v-model.
activeIndexnumberundefined否Controlled active option index.
multiplebooleanfalse否Enables multi-select mode.
multipleEmitTSelectMultipleEmitMode"label"否Payload shape used by multi-select change and confirm events: "label" emits labels, "value" emits option values, "index" emits indices, and "both" emits an object payload.
styleStyleundefined否Base terminal cell style override.
highlightStyleStyleundefined否Style used for the highlighted row or match.
matchStyleStyleundefined否Style used for matched text.
highlightMatchStyleStyleundefined否Style used for highlighted text while the row is active.
autoFocusbooleanfalse否Requests focus when the component becomes visible.
closeOnBlurbooleanfalse否Emits close when focus leaves the component.
searchablebooleanfalse否Emits query updates from typed characters; local options are not filtered automatically.
typeaheadbooleantrue否Enables keyboard typeahead navigation.
debouncenumber0否Delay before calling an async provider, in milliseconds.
emptyTextstring"No options"否Text rendered when there are no rows or items.
loadingbooleanfalse否Shows the loading row; true also covers pending async option providers.
loadingTextstring"Loading..."否Text rendered while async loading is pending.
errorTextstring"Unable to load options"否Text rendered when async loading fails.
maxVisiblenumberundefined否Maximum number of option rows rendered at once.

Events ​

名称Payload说明
update:modelValuenumber | number[] | string | string[] | unknown | unknown[] | SelectOption | SelectOption[]Emitted when the controlled model value changes.
update:activeIndexnumberEmitted when the active option index changes.
update:querystringEmitted when the controlled query changes.
changestring | string[] | unknown[] | number[] | TSelectMultipleChangePayload | nullFor single select, emits the selected option label or null; valueMode only affects update:modelValue. For multiple select, the payload follows multipleEmit.
confirmstring[] | unknown[] | number[] | TSelectMultipleChangePayloadEmitted when multi-select commits the current selection.
closevoidEmitted when the component requests to close.
focusvoidEmitted when the component receives focus.
blurvoidEmitted when the component loses focus.
keydownTerminalKeyboardEventEmitted for keydown events.
loadError{ query: string; error: unknown }Emitted when the async option provider rejects; aborted stale requests do not emit.

TSlider ​

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
modelValuenumber0否Controlled component value.
minnumber0否Minimum numeric value.
maxnumber100否Maximum numeric value.
stepnumber1否Keyboard increment step.
disabledbooleanfalse否Disables pointer and keyboard activation.
styleStyleundefined否Base terminal cell style override.
activeStyleStyle() => ({ fg: "cyanBright" })否Style used for the active item or row.
disabledStyleStyle() => ({ dim: true })否Style used for disabled content.

Events ​

名称Payload说明
update:modelValuenumberEmitted when the controlled model value changes.
changenumberEmitted when the component commits a value change.

TSpinner ​

源码:src/vue/components/TFeedback.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumberundefined否—
zIndexnumber0否—
framesreadonly string[]() => ["|", "/", "-", "\"]否—
frameIndexnumber0否—
labelstring""否—
runningbooleantrue否—
styleStyleundefined否—

Events ​

—

TSplitPane ​

源码:src/vue/components/TPanels.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
directionTSplitPaneDirection"horizontal"否—
sizesreadonly number[]—是—
minSizesreadonly number[]() => []否—
separatorStyleStyle() => ({ dim: true })否—

Events ​

名称Payload说明
update:sizesnumber[]—
resizenumber[]—

Slots ​

名称Props说明
default{ panes: readonly TSplitPaneRect[] }Pane content renderer. The host renders pane children from the resolved pane rectangles.

TStatusBar ​

源码:src/vue/components/TNavigation.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
zIndexnumber0否—
leftstring""否—
centerstring""否—
rightstring""否—
styleStyle() => ({ inverse: true })否—

Events ​

—

TSwitch ​

源码:src/vue/components/TForm.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
modelValuebooleanfalse否Controlled component value.
labelstring""否Visible label text.
disabledbooleanfalse否Disables pointer and keyboard activation.
styleStyleundefined否Base terminal cell style override.
activeStyleStyle() => ({ fg: "greenBright" })否Style used for the active item or row.
disabledStyleStyle() => ({ dim: true })否Style used for disabled content.

Events ​

名称Payload说明
update:modelValuebooleanEmitted when the controlled model value changes.
changebooleanEmitted when the component commits a value change.

TTable ​

源码:src/vue/components/TTable.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
columnsreadonly TTableColumn[]—是Table column definitions.
rowsreadonly TTableRow[]—是Rows are rendered from the top of the current viewport; TTable does not own
scrollTop or virtualization.
rowKeystring | ((row: TTableRow, index: number) => unknown)undefined否Row key field or resolver.
selectedRowKeyunknownundefined否Controlled selected row key.
selectedRowKeysreadonly unknown[]undefined否Controlled selected row keys for multi-select tables.
activeRowKeyunknownundefined否Controlled active row key.
borderbooleanfalse否Draws a border around the component.
headerbooleantrue否Shows the table header when enabled.
styleStyleundefined否Base terminal cell style override.
headerStyleStyleundefined否Style override for table header cells.
borderStyleStyleundefined否Style override for border cells.
selectedStyleStyleundefined否Style used for selected rows or nodes.
activeStyleStyleundefined否Style used for the active item or row.
emptyTextstring"No rows"否Text rendered when there are no rows or items.
headerFocusablebooleanfalse否Makes header cells keyboard focusable.
rowFocusablebooleanfalse否Makes body rows keyboard focusable.

Events ​

名称Payload说明
rowClickTTableRowClickPayloadEmitted when a table row is clicked or confirmed.
headerClickTTableHeaderClickPayloadEmitted when a table header is clicked or confirmed.
rowKeydownTTableRowKeydownPayloadEmitted when a focused table row receives a keydown event.

TTabs ​

源码:src/vue/components/TPanels.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
zIndexnumber0否—
itemsreadonly TTabsItem[]—是—
activeKeystring—是—
styleStyleundefined否—
activeStyleStyle() => ({ inverse: true })否—
disabledStyleStyle() => ({ dim: true })否—

Events ​

名称Payload说明
update:activeKeystring—
changeTTabsItem—

TTag ​

源码:src/vue/components/TFeedback.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumberundefined否Width in terminal cells.
labelstring—是Visible label text.
toneTFeedbackTone"default"否Semantic color tone.
zIndexnumber0否Render and event ordering within the current plane.
styleStyleundefined否Base terminal cell style override.

Events ​

—

TText ​

源码:src/vue/components/TText.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
valuestring—是Text content rendered into terminal cells.
wnumberundefined否Width in terminal cells.
hnumberundefined否Height in terminal cells.
styleStyleundefined否Base terminal cell style override.
clearbooleantrue否Clears the component rectangle before drawing content.
wrapbooleanfalse否Wraps text to the available cell width.
depsKeyunknownundefined否Optional key that participates in render-node dependency tracking.
Useful for forcing a repaint when the rendered output might change
even if value, style, and geometry are unchanged (e.g. external
terminal writes or higher-level virtualized row reuse).

Events ​

—

TThinkingView ​

源码:src/vue/components/TThinkingView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumberundefined否—
zIndexnumber0否—
titlestring"Thinking"否—
contentstring""否—
collapsedbooleanfalse否—
pulseFramenumber | nullnull否—
styleStyleundefined否—
headerStyleStyle() => DEFAULT_HEADER_STYLE否—
markerStyleStyleundefined否—
titleStyleStyleundefined否—
bodyStyleStyle() => DEFAULT_BODY_STYLE否—
focusablebooleanfalse否—
selectablebooleanundefined否—

Events ​

名称Payload说明
click——
toggle——

TToastViewport ​

源码:src/vue/components/TFeedback.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
xnumber0否Fallback placement viewport x when no parent clip rect is available.
ynumber0否Fallback placement viewport y when no parent clip rect is available.
offsetXnumber0否—
offsetYnumber0否—
wnumber—是Toast item width in terminal cells.
viewportWnumberundefined否Placement viewport width when no parent clip rect is available.
viewportHnumberundefined否Placement viewport height when no parent clip rect is available.
zIndexnumber40否—
maxnumber3否—
placement"top-right" | "top-left" | "bottom-right" | "bottom-left""top-right"否—
itemsreadonly TToastItem[]—是—
styleStyleundefined否—

Events ​

名称Payload说明
dismissstring—

TToolCallView ​

源码:src/vue/components/TToolCallView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumberundefined否—
zIndexnumber0否—
titlestring—是—
collapsedbooleanfalse否—
statusTToolCallStatus"pending"否—
suffixstring""否—
previewstring""否—
nestedbooleanfalse否—
selectedbooleanfalse否—
markerCollapsedstring"▸"否—
markerExpandedstring"▾"否—
statusDotstring"●"否—
previewPrefixstring" ⎿ "否—
styleStyleundefined否—
mutedStyleStyleundefined否—
headerStyleStyleundefined否—
collapsedStyleStyleundefined否—
expandedStyleStyleundefined否—
markerStyleStyleundefined否—
statusStyleStyleundefined否—
titleStyleStyleundefined否—
suffixStyleStyleundefined否—
previewStyleStyleundefined否—
focusablebooleanfalse否—
selectablebooleanundefined否—

Events ​

名称Payload说明
click——
toggle——

TToolLogView ​

源码:src/vue/components/TLogView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
sourceTLogDataSource—是—
versionnumber—是—
scrollTopnumberundefined否—
defaultScrollTopnumberundefined否—
styleStyleundefined否—
autoFocusbooleanfalse否—
selectablebooleantrue否—
autoStickToBottombooleantrue否—
overscannumber2否—
wrapbooleanfalse否—
visualIndexMode"estimated" | "exact""estimated"否—
visualIndexOptionsTLogViewVisualIndexOptionsundefined否—
ansibooleanfalse否—
linksbooleanfalse否Parses OSC8 links only with ansi=true; OSC8 links preserve parsed ANSI style and
do not inherit TLink theme defaults.
linkifyboolean | TLinkifyOptionsfalse否Plain-text URL linkification for ansi=false rows; generated links inherit TLink
theme defaults before linkStyle.
linkStyleStyleundefined否Link style override. OSC8 defaults to underline-only over parsed ANSI style;
linkify also inherits TLink theme defaults.
keyboardLinksbooleanfalse否—
linkFocusStyleStyle() => ({ inverse: true })否—
searchQuerystring""否—
searchOptionsTLogViewSearchOptionsundefined否—
highlightMatchesbooleantrue否—
matchStyleStyle() => ({ inverse: true })否—
currentMatchStyleStyle() => ({ inverse: true, bold: true })否—
rowScrollModeRowScrollMode"off"否—

Events ​

名称Payload说明
scroll——
update:scrollTop——
update:searchQuery——
search——
searchMatch——
searchMarkers——
linkClick——
linkFocus——
linkActivate——
visualIndex——
focus——
blur——
keydown——

TTooltip ​

源码:src/vue/components/TOverlay.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
modelValuebooleantrue否—
xnumber—是—
ynumber—是—
wnumberundefined否—
zIndexnumber30否—
contentstring—是—
styleStyle() => ({ inverse: true })否—

Events ​

—

TTranscriptView ​

源码:src/vue/components/TTranscriptView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
sourceTTranscriptDataSource—是—
versionnumber—是—
scrollTopnumberundefined否—
defaultScrollTopnumber0否—
autoStickToBottombooleanfalse否—
selectablebooleantrue否—
wrapbooleanfalse否—
styleStyleundefined否—
hoverStyleStyleundefined否—
focusStyleStyleundefined否—
autoFocusbooleanfalse否—
focusablebooleantrue否—
wheelScrollbooleantrue否—
keyboardRegionsbooleantrue否—
rowScrollModeRowScrollMode"unsafe-full-row"否—

Events ​

名称Payload说明
scroll——
update:scrollTop——
rowClick——
actionClick——
linkClick——
foldToggle——
toolClick——
hoverRegion——

TTransition ​

源码:src/vue/components/TTransition.ts

API maturity: Advanced

Import: @simon_he/vue-tui/vue

Props ​

名称类型默认值必填说明
showboolean—是—
durationnumber200否—
beforeEnterTransitionHookundefined否—
enterTransitionHookundefined否—
afterEnterTransitionHookundefined否—
beforeLeaveTransitionHookundefined否—
leaveTransitionHookundefined否—
afterLeaveTransitionHookundefined否—

Events ​

—

TTree ​

源码:src/vue/components/TTree.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
nodesreadonly TTreeNode[]—是Tree nodes.
expandedIdsreadonly string[]() => []否Controlled expanded tree node ids.
selectedIdstring""否Controlled selected tree node id.
styleStyleundefined否Base terminal cell style override.
selectedStyleStyle() => ({ inverse: true })否Style used for selected rows or nodes.
disabledStyleStyle() => ({ dim: true })否Style used for disabled content.
indentnumber2否Indent width per tree depth.
selectableParentsbooleanfalse否Allows expandable parent tree nodes to be selected from their label.

Events ​

名称Payload说明
update:expandedIdsstring[]Emitted when expanded tree node ids change.
update:selectedIdstringEmitted when the selected tree node id changes.
selectTTreeSelectPayloadEmitted when the active item is selected.
toggleTTreeTogglePayloadEmitted when a tree node expands or collapses.

TUserMessageView ​

源码:src/vue/components/TUserMessageView.ts

API maturity: Experimental

Import: @simon_he/vue-tui/agent

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumberundefined否—
zIndexnumber0否—
labelstring"user"否—
prefixstring"> "否—
metastring""否—
contentstring—是—
indentnumber2否—
topBlankbooleantrue否—
bottomBlankbooleantrue否—
segmentsreadonly TUserMessageSegment[]() => []否—
styleStyle() => DEFAULT_BLOCK_STYLE否—
headerStyleStyle() => DEFAULT_HEADER_STYLE否—
prefixStyleStyle() => DEFAULT_LABEL_STYLE否—
labelStyleStyle() => DEFAULT_LABEL_STYLE否—
contentStyleStyleundefined否—
segmentStyleStyle() => DEFAULT_SEGMENT_STYLE否—
focusablebooleanfalse否—
selectablebooleanundefined否—

Events ​

—

TVideo ​

源码:src/vue/components/TVideo.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
srcstring—是—
frameSourceTVideoFrameSource—是—
pausedbooleanundefined否—
playbackRateTVideoPlaybackRateundefined否—
controlsbooleanfalse否—
controlsLayoutTVideoControlsLayout"compact"否—
durationMsnumberundefined否—
loopbooleanfalse否—
maxFpsnumberDEFAULT_MAX_FPS否—
pixelWidthnumberundefined否—
pixelHeightnumberundefined否—
fallbackstring"[video]"否—
styleStyleundefined否—
clearbooleantrue否—

Events ​

名称Payload说明
frameTVideoFrameEvent—
ended——
errorunknown—
seekTVideoSeekEvent—
update:pausedboolean—
update:playbackRateTVideoPlaybackRate—

TView ​

源码:src/vue/components/TView.ts

API maturity: Public

Import: @simon_he/vue-tui

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
scrollXnumber0否Horizontal content offset in terminal cells.
scrollYnumber0否Vertical content offset in terminal cells.
focusablebooleanfalse否Adds the component to keyboard focus navigation.
selectablebooleanundefined否Controls whether terminal text selection may start inside the view.
selectionScrollBy(deltaRows: number) => boolean | voidundefined否Scroll callback used while a pointer selection reaches the viewport edge.
autoFocusbooleanfalse否Requests focus when the component becomes visible.

Events ​

名称Payload说明
clickCaptureTerminalPointerEventEmitted for click events. Runs during capture.
clickTerminalPointerEventEmitted for click events.
dblclickCaptureTerminalPointerEventEmitted for double-click events. Runs during capture.
dblclickTerminalPointerEventEmitted for double-click events.
pointerdownCaptureTerminalPointerEventEmitted for pointer down events. Runs during capture.
pointerdownTerminalPointerEventEmitted for pointer down events.
pointerupCaptureTerminalPointerEventEmitted for pointer up events. Runs during capture.
pointerupTerminalPointerEventEmitted for pointer up events.
pointermoveCaptureTerminalPointerEventEmitted for pointer move events. Runs during capture.
pointermoveTerminalPointerEventEmitted for pointer move events.
pointerenterCaptureTerminalPointerEventEmitted when the pointer enters the component. Runs during capture.
pointerenterTerminalPointerEventEmitted when the pointer enters the component.
pointerleaveCaptureTerminalPointerEventEmitted when the pointer leaves the component. Runs during capture.
pointerleaveTerminalPointerEventEmitted when the pointer leaves the component.
wheelCaptureTerminalPointerEventEmitted for wheel events. Runs during capture.
wheelTerminalPointerEventEmitted for wheel events.
keydownCaptureTerminalKeyboardEventEmitted for keydown events. Runs during capture.
keydownTerminalKeyboardEventEmitted for keydown events.
keyupCaptureTerminalKeyboardEventEmitted for keyup events. Runs during capture.
keyupTerminalKeyboardEventEmitted for keyup events.
focusCapturevoidEmitted when the component receives focus. Runs during capture.
focusvoidEmitted when the component receives focus.
blurCapturevoidEmitted when the component loses focus. Runs during capture.
blurvoidEmitted when the component loses focus.

Slots ​

名称Props说明
default—Children rendered with this view's layout origin, clip rect, render stack, and event z-index context.

TVirtualList ​

源码:src/vue/components/TVirtualList.ts

API maturity: Experimental

Import: @simon_he/vue-tui/experimental

Props ​

名称类型默认值必填说明
xnumber—是—
ynumber—是—
wnumber—是—
hnumber—是—
zIndexnumber0否—
itemCountnumber—是—
itemVersionnumber—是—
getItem(index: number) => unknown—是—
renderItem(item: unknown, index: number) => unknownundefined否—
modelValuenumber0否—
scrollTopnumberundefined否—
styleStyleundefined否—
activeStyleStyleundefined否—
autoFocusbooleanfalse否—
selectionText(item: unknown, index: number) => stringundefined否—
selectablebooleanfalse否—
rowScrollModeRowScrollMode"off"否—
terminalGraphicScrollIdleMsnumber96否—

Events ​

名称Payload说明
update:modelValue——
update:scrollTop——
change——
itemClick——
scroll——
focus——
blur——
keydown——

TVirtualMarkdown ​

源码:src/vue/components/TVirtualMarkdown.ts

API maturity: Public

Import: @simon_he/vue-tui/markdown

Props ​

名称类型默认值必填说明
xnumber—是Left position in terminal cells.
ynumber—是Top position in terminal cells.
wnumber—是Width in terminal cells.
hnumber—是Height in terminal cells.
zIndexnumber0否Render and event ordering within the current plane.
contentstring""否Markdown source rendered when external blocks are not provided.
blocksreadonly TuiMarkdownBlock[]undefined否Prebuilt markdown blocks used instead of parsing content.
scrollTopnumber0否Controlled top visual-row offset within the markdown viewport.
styleStyleundefined否Base terminal cell style override.
finalbooleantrue否Parses the markdown as a complete document when enabled.
streamingbooleanfalse否Coalesces rapid content updates into frame-scheduled markdown rebuilds.
autoFocusbooleanfalse否Requests focus when the component becomes visible.
selectablebooleantrue否Controls whether native terminal text selection may start inside the markdown viewport.
customHtmlTagsreadonly string[]undefined否Additional HTML tag names accepted by the markdown parser.
themeTuiMarkdownThemeOverridesundefined否Markdown theme token overrides for parsed blocks and inline segments.
imageRendererTuiMarkdownImageResolverundefined否Optional resolver for markdown image payloads before terminal graphics rendering.
imageMinWidthnumberundefined否Minimum markdown image render width in terminal cells.
imageMaxWidthnumberundefined否Maximum markdown image render width in terminal cells.
imageMinHeightnumberundefined否Minimum markdown image render height in terminal cells.
imageMaxHeightnumberundefined否Maximum markdown image render height in terminal cells.
imagePreserveAspectRatiobooleantrue否Preserves markdown image aspect ratio while fitting width and height bounds.
mathImagesbooleantrue否Renders markdown math as terminal graphics images when the terminal supports it.
mathCellWidthPxnumberundefined否Terminal cell width in pixels used to map rendered formulas to cells.
mathCellHeightPxnumberundefined否Terminal cell height in pixels used to map rendered formulas to cells.
mathScalenumberundefined否Rasterization DPI scale for rendered formulas (does not change cell size).
mathColorstringundefined否Hex color used for rendered formula glyphs; defaults to the text foreground.
mathMaxWidthCellsnumberundefined否Maximum width in terminal cells for block-level formulas before they are scaled down.
mathBaselineRationumberundefined否Inline formula baseline position as a fraction of cell height, used to align formulas with text.
imageActionsbooleanfalse否Enables pointer actions for rendered markdown images.
mathActionsbooleanfalse否Enables pointer actions for rendered or raw markdown math syntax.
linkActionsbooleanfalse否Enables pointer actions for rendered markdown links.
imageOcclusionRectsreadonly Rect[]undefined否Terminal rectangles that markdown image layout treats as unavailable for graphics placement.
rowScrollModeTVirtualRowsRowScrollMode"off"否Enables exposed-row scrolling for an unclipped full-width viewport that exclusively owns its render-plane rows when set to "unsafe-full-row".

Events ​

名称Payload说明
update:scrollTopnumberEmitted when the top visible row offset should change.
scrollnumberEmitted when the visible scroll offset changes.
focusvoidEmitted when the component receives focus.
blurvoidEmitted when the component loses focus.
keydownTerminalKeyboardEventEmitted for keydown events.
imageActionTuiMarkdownImageActionPayloadEmitted when imageActions is enabled and a markdown image action is selected.
mathActionTuiMarkdownMathActionPayloadEmitted when mathActions is enabled and a markdown math action is selected.
linkActionTuiMarkdownLinkActionPayloadEmitted when linkActions is enabled and a markdown link action is selected.

Bug reports, feature requests, and documentation issues are tracked on GitHub Issues.