# Workflow UI

Source: /tuil/docs/reference/components/workflow
Locale: en

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





## Overview [#overview]

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

## Installation [#installation]

<CodeBlockTabs defaultValue="npm">
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="npm">
      npm
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="pnpm">
      pnpm
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="yarn">
      yarn
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="bun">
      bun
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="npm">
    ```bash
    npx @mwillbanks/tuil add workflow operation-list operation-tree splash-screen help-overlay
    ```
  </CodeBlockTab>

  <CodeBlockTab value="pnpm">
    ```bash
    pnpm dlx @mwillbanks/tuil add workflow operation-list operation-tree splash-screen help-overlay
    ```
  </CodeBlockTab>

  <CodeBlockTab value="yarn">
    ```bash
    yarn dlx @mwillbanks/tuil add workflow operation-list operation-tree splash-screen help-overlay
    ```
  </CodeBlockTab>

  <CodeBlockTab value="bun">
    ```bash
    bun x @mwillbanks/tuil add workflow operation-list operation-tree splash-screen help-overlay
    ```
  </CodeBlockTab>
</CodeBlockTabs>

The CLI writes source-owned components beneath the destination configured in
`tuil.config.ts`; the default import below assumes `src/components/tuil`.

<PublishedStory storyId="component-acceptance" variant="Workflow" />

## Components and subcomponents [#components-and-subcomponents]

| API                                                                          | Signature                        | Description                             |
| ---------------------------------------------------------------------------- | -------------------------------- | --------------------------------------- |
| [`Workflow`](/tuil/docs/reference/components/workflow/workflow)                   | `constant Workflow`              | Public constant Workflow.               |
| [`Workflow.Header`](/tuil/docs/reference/components/workflow/workflow-header)     | `subcomponent Workflow.Header`   | Public subcomponent Workflow\.Header.   |
| [`Workflow.Body`](/tuil/docs/reference/components/workflow/workflow-body)         | `subcomponent Workflow.Body`     | Public subcomponent Workflow\.Body.     |
| [`Workflow.Footer`](/tuil/docs/reference/components/workflow/workflow-footer)     | `subcomponent Workflow.Footer`   | Public subcomponent Workflow\.Footer.   |
| [`Workflow.Progress`](/tuil/docs/reference/components/workflow/workflow-progress) | `subcomponent Workflow.Progress` | Public subcomponent Workflow\.Progress. |
| [`Workflow.Errors`](/tuil/docs/reference/components/workflow/workflow-errors)     | `subcomponent Workflow.Errors`   | Public subcomponent Workflow\.Errors.   |
| [`Workflow.Next`](/tuil/docs/reference/components/workflow/workflow-next)         | `subcomponent Workflow.Next`     | Public subcomponent Workflow\.Next.     |
| [`Workflow.Back`](/tuil/docs/reference/components/workflow/workflow-back)         | `subcomponent Workflow.Back`     | Public subcomponent Workflow\.Back.     |
| [`Workflow.Skip`](/tuil/docs/reference/components/workflow/workflow-skip)         | `subcomponent Workflow.Skip`     | Public subcomponent Workflow\.Skip.     |
| [`Workflow.Cancel`](/tuil/docs/reference/components/workflow/workflow-cancel)     | `subcomponent Workflow.Cancel`   | Public subcomponent Workflow\.Cancel.   |
| [`OperationList`](/tuil/docs/reference/components/workflow/operation-list)        | `function OperationList`         | Public function OperationList.          |
| [`OperationTree`](/tuil/docs/reference/components/workflow/operation-tree)        | `function OperationTree`         | Public function OperationTree.          |
| [`SplashScreen`](/tuil/docs/reference/components/workflow/splash-screen)          | `function SplashScreen`          | Public function SplashScreen.           |
| [`HelpOverlay`](/tuil/docs/reference/components/workflow/help-overlay)            | `function HelpOverlay`           | Public function HelpOverlay.            |

## Interaction [#interaction]

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

## API and events [#api-and-events]

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

Every interactive component publishes semantic roles, labels, state, and focus
identity through the renderer's `SemanticRegistry`. Callback failures flow to
the owning application's error boundary.

<Mermaid
  chart="flowchart LR
  S0[&#x22;props and runtime state&#x22;]
  S1[&#x22;semantic registration&#x22;]
  S2[&#x22;focus and input routing&#x22;]
  S3[&#x22;callback or state update&#x22;]
  S4[&#x22;rerender&#x22;]
  S0 --> S1
  S1 --> S2
  S2 --> S3
  S3 --> S4"
/>

## Example [#example]

```tsx
import type { ComponentProps } from "react";
import { Workflow } from "@/components/tuil/workflows/workflow";

export function Example(props: ComponentProps<typeof Workflow>) {
  return <Workflow {...props} />;
}
```

Registry-installed components are source-owned: customize the generated file in
your application, and use the package reference for the shared runtime contracts.
