tuil
ReferenceComponentsWorkflow UI

OperationTree

OperationTree component API, behavior, and executable example.

View rawEdit

Loading executable example…

API and events

Bind observable workflow and operation snapshots to guided terminal flows, progress, errors, cancellation, splash state, and contextual help.

export function OperationTree({
  id = "operation-tree",
  operations,
  expanded,
  defaultExpanded = operations.map((operation) => operation.id),
  onExpandedChange,
  value,
  defaultValue,
  onValueChange,
  slots,
  slotProps,
  ...props
}: OperationTreeProps): ReactNode;

Props, functions, and events

MemberTypeRequiredDescriptionRelated types
expandedreadonly string[] | undefinedNoThe expanded member uses the readonly string[] | undefined contract.
defaultExpandedreadonly string[] | undefinedNoThe defaultExpanded member uses the readonly string[] | undefined contract.
onExpandedChange((expanded: readonly string[]) => void | Promise<void>) | undefinedNoThe onExpandedChange member uses the ((expanded: readonly string[]) => void | Promise<void>) | undefined contract.
valuestring | undefinedNoThe value member uses the string | undefined contract.
defaultValuestring | undefinedNoThe defaultValue member uses the string | undefined contract.
onValueChange((value: string) => void | Promise<void>) | undefinedNoThe onValueChange member uses the ((value: string) => void | Promise<void>) | undefined contract.
idstring | undefinedNoThe id member uses the string | undefined contract.
operationsreadonly OperationSnapshot<unknown>[]YesThe operations member uses the readonly OperationSnapshot<unknown>[] contract.OperationSnapshot
showDurationboolean | undefinedNoThe showDuration member uses the boolean | undefined contract.
showAttemptsboolean | undefinedNoThe showAttempts member uses the boolean | undefined contract.
showProgressboolean | undefinedNoThe showProgress member uses the boolean | undefined contract.
nownumber | undefinedNoThe now member uses the number | undefined contract.
slotsPartial<SlotComponents<&#123; root: import("ink").BoxProps; item: import("ink").BoxProps; title: import("ink").TextProps; metadata: import("ink").TextProps; &#125;>> | undefinedNoThe slots member uses the Partial<SlotComponents<&#123; root: import("ink").BoxProps; item: import("ink").BoxProps; title: import("ink").TextProps; metadata: import("ink").TextProps; &#125;>> | undefined contract.BoxProps, SlotComponents, TextProps
slotPropsPartial<SlotProps<&#123; root: import("ink").BoxProps; item: import("ink").BoxProps; title: import("ink").TextProps; metadata: import("ink").TextProps; &#125;, object>> | undefinedNoThe slotProps member uses the Partial<SlotProps<&#123; root: import("ink").BoxProps; item: import("ink").BoxProps; title: import("ink").TextProps; metadata: import("ink").TextProps; &#125;, object>> | undefined contract.BoxProps, SlotProps, TextProps
unstyledboolean | undefinedNoThe unstyled member uses the boolean | undefined contract.
variantstring | undefinedNoThe variant member uses the string | undefined contract.
size"sm" | "md" | "lg" | undefinedNoThe size member uses the "sm" | "md" | "lg" | undefined contract.

The runner emits the complete workflow:* lifecycle; operation components reflect operation snapshots and callbacks.

Callback props run after the documented input is accepted. Callbacks are not cancellable unless their return type or description states otherwise.

Interaction and capabilities

Controls call the runner's next, back, skip, retry, cancel, and rollback operations with transition locking.

The published manifest records keyboard, focus, pointer, theme, terminal, semantic, event, and dependency requirements.

Complete import

import { OperationTree } from "@/components/tuil/workflows/workflow";

On this page