Queued
Build
Deploy

Installation

Barrel

Granular

Usage

The Flow components work together to create directed flow diagrams. Use
`Flow` as the container,
`Flow.Node` for individual
steps, and
`Flow.Parallel` to create
branching paths.

export default function Example() {
  return (
    <Flow>
      <Flow.Node>Step 1</Flow.Node>
      <Flow.Node>Step 2</Flow.Node>
      <Flow.Node>Step 3</Flow.Node>
    </Flow>
  );
}

Examples

Sequential Flow

A simple linear flow with nodes connected in sequence.

Queued
Build
Deploy

Parallel Branches

Use Flow.Parallel to create branching paths that run in parallel.

Queued
Build
Deploy

Custom Node Styling

Use the render prop to completely customize node appearance. The render prop accepts a React element that will be used instead of the default styled node.

Queued
Build
Deploy

Centered Alignment

Use the align prop to vertically center nodes. This is useful when nodes have different heights.

Queued
Build
Deploy

Complex Flow

Combine sequential and parallel nodes to build complex workflows.

Queued
Build
Deploy

Custom Anchor Points

By default, connectors attach to the center of each node. Use Flow.Anchor with its render prop to specify custom attachment points. The type prop controls whether the anchor serves as a "start" point (where connectors leave) or "end" point (where connectors arrive).

Queued
Build
Deploy

Panning Large Diagrams

When a diagram exceeds its container, Flow automatically enables panning. Drag to pan the viewport, or use the scroll wheel. Scrollbars appear on hover to indicate available scroll area.

Queued
Build
Deploy

Disabled Nodes

Use the disabled prop on a node to visually indicate it's inactive. Connectors linking to disabled nodes are rendered with reduced opacity.

Queued
Build
Deploy

Parallel Node Alignment

Use the
`align` prop on
`Flow.Parallel`
to control how nodes with different widths are aligned. Use
`"start"`
(default) to align left, or
`"end"` to align
right.
Queued
Build
Deploy

Known Issue: Sidebar / Layout Shift

Toggling the sidebar shifts the Flow container's viewport position. Because
connector coordinates are computed from stale `getBoundingClientRect` values
stored in state (captured before the layout shift), the connector lines jump
out of alignment until the next remeasure is triggered. Scroll the page
while the sidebar is open to hit the same bug via the scroll path.
Queued
Build
Deploy

Other Examples

Nested Node Lists in Parallel

Use
`Flow.List`
inside
`Flow.Parallel`
to create parallel branches where each branch contains a sequence of connected
nodes.
Queued
Build
Deploy

Components

Flow

The root container for flow diagrams. Provides panning and scrolling for large diagrams.

PropTypeDescription
align"start" | "center"Vertical alignment of nodes. `"start"` (default) aligns to top, `"center"` vertically centers nodes.
classNamestringAdditional CSS classes for the container
childrenReactNodeFlow.Node and Flow.Parallel components

Flow.Node

A single node in the flow diagram. Renders as a styled card with automatic connector points. Use the render prop to customize the element.

PropTypeDescription
renderReactElementCustom element to render instead of the default styled node
disabledbooleanWhen true, connectors linking to this node are rendered with reduced opacity
childrenReactNodeContent to display inside the node

Flow.Anchor

A component that marks a custom attachment point for connectors within a Flow.Node. Use this to control exactly where connector lines attach instead of the default node center by providing a custom element via the render prop.

PropTypeDescription
type"start" | "end"Whether this anchor serves as a "start" point (outgoing connectors) or "end" point (incoming connectors). When omitted, serves as both.
renderReactElementCustom element to render for the anchor point
childrenReactNodeContent to render at the anchor point

Flow.Parallel

A container for parallel branches. Child Flow.Node components are displayed in parallel with junction connectors.

PropTypeDescription
align"start" | "end"Controls horizontal alignment of nodes within the parallel group. `"start"` (default) aligns left, `"end"` aligns right.
childrenReactNodeFlow.Node or Flow.List components to display in parallel

Flow.List

A container for a sequence of Flow.Node components with automatic
connectors between them. Use inside Flow.Parallel to create branches
with multiple sequential steps.


<table class="w-full">
  <thead>
    <tr class="border-b border-kumo-hairline">
      <th class="px-4 py-3 text-left font-semibold">Prop</th>
      <th class="px-4 py-3 text-left font-semibold">Type</th>
      <th class="px-4 py-3 text-left font-semibold">Description</th>
    </tr>
  </thead>
  <tbody>
    <tr class="border-b border-kumo-hairline">
      <td class="px-4 py-3 font-mono">children</td>
      <td class="px-4 py-3 font-mono">ReactNode</td>
      <td class="px-4 py-3">Flow.Node components to display in sequence</td>
    </tr>
  </tbody>
</table>