Block

Sequence Flow

Vertical flow: enrollment → step cards → wait pills on a 1px connector → add step.

react-aria-componentslucide-react

Preview

Series B — VP Sales

3 steps · automatic

  1. 128 prospects enrolled
  2. Email · Intro

    Day 1 · Automatic

    Step 1

    Quick question about {{company}}’s SDR ramp

    Hi {{first_name}}, congrats on the {{recent_signal}}…

    Sent
    128
    Opened
    64%
    Replied
    7.8%
  3. Wait 2 days
  4. LinkedIn · Connection request

    Day 3 · Manual task

    Step 2

    Connection note

    Hi {{first_name}} — saw {{company}} is hiring SDRs…

  5. Wait 3 days
  6. Call · Follow-up call

    Day 6 · Manual task

    Step 3

    Reference the case study and ask about ramp time.

Installation

Components are copied into your project — no runtime package.

  1. Install the following dependencies:

    terminal
    npm install react-aria-components lucide-react
  2. Create a sequence-flow.tsx file and paste the following code into it.

    src/components/blocks/sequence-flow.tsx
    import { Plus, Send, Users } from "lucide-react";
    import { Fragment, type ReactNode } from "react";
    import { Button } from "@/components/ui/button";
    import { Card, CardBody, CardHeader, IconTile } from "@/components/ui/card";
    import { SequenceStep, type SequenceStepProps, SequenceWait } from "@/components/ui/sequence-step";
    
    export interface SequenceFlowItem extends Omit<SequenceStepProps, "step" | "className"> {
      /** Wait shown on the connector before this step. */
      waitBefore?: string;
    }
    
    const Connector = () => <span aria-hidden className="mx-auto block h-4 w-px bg-line-strong" />;
    
    /** A vertical flow, not a node graph: enrollment → step cards → wait pills on a 1px connector → add step. */
    export function SequenceFlow({
      name = "Series B — VP Sales",
      description,
      enrollment = "128 prospects enrolled",
      steps,
      actions = <Button size="sm">Edit sequence</Button>,
      className,
    }: {
      name?: ReactNode;
      /** Defaults to the step count. */
      description?: ReactNode;
      enrollment?: string;
      steps: SequenceFlowItem[];
      actions?: ReactNode;
      className?: string;
    }) {
      return (
        <Card className={className}>
          <CardHeader
            icon={
              <IconTile tone="rose">
                <Send />
              </IconTile>
            }
            title={name}
            description={description ?? `${steps.length} steps · automatic`}
            actions={actions}
          />
          {/* Subtle panel so the white step cards stand out. */}
          <CardBody className="bg-subtle px-4 py-6">
        <ol className="mx-auto flex w-full max-w-xl flex-col">
          <li className="flex justify-center">
            <span className="inline-flex h-8 items-center gap-2 rounded-full bg-accent-soft px-3 text-sm font-medium text-accent-text">
              <Users aria-hidden className="size-3.5" /> {enrollment}
            </span>
          </li>
          {steps.map(({ waitBefore, ...step }, i) => (
            <Fragment key={i}>
              <li aria-hidden>
                <Connector />
              </li>
              {waitBefore && (
                <>
                  <li className="flex justify-center">
                    <SequenceWait>{waitBefore}</SequenceWait>
                  </li>
                  <li aria-hidden>
                    <Connector />
                  </li>
                </>
              )}
              <li>
                <SequenceStep step={i + 1} {...step} />
              </li>
            </Fragment>
          ))}
          <li aria-hidden>
            <Connector />
          </li>
          <li className="flex justify-center">
            <button className="inline-flex h-9 items-center gap-1.5 rounded-md border border-dashed border-line-strong bg-surface px-3 text-base text-fg-secondary outline-none hover:border-fg-disabled hover:text-fg focus-visible:shadow-focus">
              <Plus className="size-3.5" /> Add step
            </button>
          </li>
        </ol>
          </CardBody>
        </Card>
      );
    }
  3. Add the theme tokens and the cx helper from Installation if you haven’t yet, then update the import paths to match your project setup.