Automation Builder Page React block for Tailwind CSS v4
v1.0.0Added in 1.0.0
A React automation builder page: rules with on and off switches and run health, a visual workflow editor, a cron inspector, tests and logs.
The list shows every automation with its trigger (a lightning bolt for events, a clock for schedules, described in words), a bar of its last 14 runs, how the last one went and when, and an on / off switch that works without opening the row. Type in the search to filter by name or trigger, press All, Active, Off or With errors; the count is announced. Click or tap a row (Enter on the keyboard) to open it: on a phone the editor slides in over the list and a swipe from the left edge, the back button or Escape brings the list back. Drag the divider to resize the list. In the editor, click the name to rename it, flip Active (turning on a broken workflow is refused with a toast; confirmDisable asks before turning off), press Run a test (the steps light up one after another, the result lands in History; the QuickBooks sync fails with a 503 and jumps to its log), and Save once something changed (mod+s saves; a workflow without a trigger or with a dangling branch shows its problems and selects the step). The ⋯ menu duplicates, exports the automation as JSON or deletes it after a confirm; on phones it also holds Test and Save. The canvas pans and zooms, drags steps, inserts one on a connection, and opens a step's settings on click (a sheet on phones); the schedule trigger opens a cron picker with the next runs. Leaving an automation with unsaved changes asks first. History lists the runs (status, start, duration, trigger; cards on phones) and the selected run's log with level chips, search, wrap and download; on phones a run pushes its log with a back button. New opens a dialog with a name and four templates (Blank, Invoice reminder, Scheduled report, New lead). Sections rise in once on mount; reduced motion keeps them still.
Automation Builder Page is a Pro React block in the React blocks category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add automation-builder-page, together with Alert, Alert Dialog, Badge, Button, Cron Picker and 29 more and the npm packages motion and lucide-react.
Add to a project
Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup
npx wingo-ui@latest add automation-builder-pageAutomation Builder Page is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans
Usage
Import AutomationBuilderPage from @/components/blocks/automation-builder-page.
// app/(admin)/automations/page.tsx (the shell lives in app/(admin)/layout.tsx: <AdminShell layout="fill">{children}</AdminShell>)
"use client"
import { AutomationBuilderPage, type Automation } from "@/components/blocks/automation-builder-page"
export default function AutomationsPage() {
return (
<AutomationBuilderPage
height="fill"
onToggle={async (automation: Automation, enabled: boolean) => {
await fetch(`/api/automations/${automation.id}`, { method: "PATCH", body: JSON.stringify({ enabled }) })
}}
onSave={async (automation: Automation) => {
await fetch(`/api/automations/${automation.id}`, { method: "PUT", body: JSON.stringify(automation) })
}}
onTest={async (automation: Automation) => {
const response = await fetch(`/api/automations/${automation.id}/test`, { method: "POST" })
if (!response.ok) throw new Error(await response.text())
}}
/>
)
}Props
automationsAutomation[]The automations, controlled ({ id, name, description?, enabled, trigger: { type: "event" | "schedule", label, cron? }, workflow: WorkflowValue, lastRun?, runs7d }); pair it with onAutomationsChange.
defaultAutomationsAutomation[]The automations while uncontrolled; defaults to AUTOMATION_BUILDER_SAMPLE.automations (six Summit CRM rules). Workflows without positions are laid out on load.
onAutomationsChange(automations: Automation[]) => voidCalled with the whole new list after a toggle, save, create, duplicate or delete.
runsAutomationRun[]The run history ({ id, automationId, label?, startedAt, duration, status, trigger, error?, logs: LogLine[] }); defaults to AUTOMATION_BUILDER_SAMPLE.runs (40 runs). Test runs are added on top.
nodeTypesWorkflowNodeDef[]The canvas step catalog (triggers, CRM actions, messages, AI, logic); defaults to AUTOMATION_NODE_TYPES. Keep it stable.
selectedIdstring | nullThe open automation, controlled; null shows the Pick an automation placeholder.
defaultSelectedIddefault"invoice-reminder"string | nullThe automation open first while uncontrolled. Phones start on the list either way.
onSelectedIdChange(id: string | null) => voidCalled when a row, a create or a delete changes the open automation.
tab"editor" | "history"The editor tab, controlled.
defaultTabdefault"editor""editor" | "history"The tab shown first: the workflow canvas or the run history with logs.
onTabChange(tab: AutomationBuilderPageTab) => voidCalled when the tabs switch, and when a failed test or View log opens the history.
defaultStepIddefault""stringA step id whose settings open on mount, or "trigger" for the automation's trigger (the cron picker on schedules).
heightdefault"fill""auto" | "fill" | "screen"fill takes what is left of an admin shell with layout="fill" and scrolls inside its panes; screen is a standalone h-dvh page; auto is as tall as the window (at least 760px) with a fixed 640px canvas.
listWidthdefault320numberThe list column in px (260 to 420); the divider drags it too.
saveShortcutdefault"mod+s"stringThe key that saves the open automation, shown on the Save button; "" binds nothing.
confirmDisabledefaultfalsebooleanAsk before switching an automation off (from the list or the editor).
onToggle(automation: Automation, enabled: boolean) => (void | Promise<unknown>)The on / off switch, optimistic; a rejection flips it back with a toast. A 600 ms request is simulated by default.
onSave(automation: Automation) => (void | Promise<unknown>)Save and mod+s, after validateWorkflow passes; a rejection keeps the changes with a toast. Simulated by default.
onTest(automation: Automation) => (void | Promise<unknown>)Run a test: resolve when it passes, reject with the reason when it fails. The default takes 1.8 s and fails for QuickBooks sync with QuickBooks responded with 503.
onCreate(automation: Automation) => (void | Automation | Promise<void | Automation>)The new automation dialog; resolve with the stored automation to replace the draft, reject to show the error in the dialog.
onDelete(automation: Automation) => (void | Promise<unknown>)Delete from the ⋯ menu, run while the confirm dialog shows its spinner; a rejection keeps the dialog open with the error.
onDuplicate(automation: Automation) => (void | Automation | Promise<void | Automation>)Duplicate: gets the copy (off, no history); resolve with the stored one to replace it.
labelsPartial<AutomationBuilderPageLabels>Every visible string, English by default (DEFAULT_AUTOMATION_BUILDER_PAGE_LABELS; AUTOMATION_BUILDER_PAGE_LABELS_EN is the same set). Nested keys (canvas, cronPicker, logViewer, table, list, inlineEdit) translate the composed items.
localedefault"en-US"stringIntl locale for relative times, durations, dates in the logs and the cron descriptions.
nowDate | numberThe reference time for relative times, test runs and next cron runs; defaults to the live clock.
tonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The accent of New and Save, the switches, the pressed chips, the tabs, the canvas selection and the cron picker.
radiusdefault"md""sm" | "md" | "lg"The canvas, the run table, the log and the alerts (12px, 16px or 24px).
loadingdefaultfalsebooleanThe list rows and the editor as skeletons.
animateIndefaulttruebooleanThe list and the editor rise in once on mount; off in thumbnails and under reduced motion.
linkComponentdefault"<a>"(props: LinkComponentProps) => ReactNodeThe router link for links inside the page; defaults to the LinkProvider's (a plain anchor).
classNamestringMerged onto the root.
classNamesPartial<Record<AutomationBuilderPageSlot, string>>Classes for the parts: list, editor, header, canvas, history, log, empty, newDialog.
Parts
AUTOMATION_NODE_TYPES
constantThe node palette of the workflow editor, grouped as triggers, CRM actions, messaging, AI and logic. Filter it or add your own node definitions.
DEFAULT_AUTOMATION_BUILDER_PAGE_LABELS
constantEvery English string of the rules list, the editor, the inspector, tests and run logs. Spread it and override what you translate.
AUTOMATION_BUILDER_PAGE_LABELS_EN
constantAn alias of DEFAULT_AUTOMATION_BUILDER_PAGE_LABELS, kept so older imports keep working.
AUTOMATION_BUILDER_SAMPLE
constantThe demo content in one object: automations, runs and now. Replace it with data from your API.
AUTOMATION_SAMPLE_AUTOMATIONS
constantThe sample rules, each with its trigger, workflow, last run and 7-day success and failure counts.
AUTOMATION_SAMPLE_RUNS
constantThe sample run history, newest first, with what started each run, its status, duration, error and log lines.
AUTOMATION_SAMPLE_IDS
constantThe ids of the sample automations, offered by the demo's defaultSelectedId control.
AUTOMATION_BUILDER_NOW
constantThe fixed "now" of the sample (September 24, 2026, 4:40 PM) that run times are measured from.
Examples
Scheduled report, cron inspector open
defaultSelectedId="weekly-report" defaultStepId="trigger": the Monday 9:00 AM schedule in the cron picker with its next runs.
Failed QuickBooks sync, history
defaultTab="history" on QuickBooks sync: the failed run #4812 and its log with the 503 errors.
Nothing selected
defaultSelectedId={null}: the list and the Pick an automation placeholder.
No automations yet
An empty account: the list offers the templates, each opens the new automation dialog.
Brand tone, large radius
tone="brand" radius="lg" confirmDisable on the AI lead scoring, with a run in progress.
Loading
loading: the list rows and the editor as skeletons.
British English
locale="en-GB": 24 hour times and day-first dates in the list, the history and the cron picker.
Dependencies
Files
- components/blocks/automation-builder-page.tsx
- components/blocks/automation-builder-page-data.ts
FAQ
Is the React Automation Builder Page block free?
The preview, props and docs are free; copying the source needs a Pro plan. See plans.
How do I install Automation Builder Page?
Run npx wingo-ui@latest add automation-builder-page. It also adds the Wingo UI items it builds on (Alert, Alert Dialog, Badge, Button, Cron Picker and 29 more) and the npm packages motion and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/automation-builder-page.
How does Automation Builder Page behave on phones?
Click or tap a row (Enter on the keyboard) to open it: on a phone the editor slides in over the list and a swipe from the left edge, the back button or Escape brings the list back. The ⋯ menu duplicates, exports the automation as JSON or deletes it after a confirm; on phones it also holds Test and Save.
See also
More React blocks
Articles using this component
- React Workflow Builder: Triggers, Branches and AI Steps
Build it: screens and apps13 min read