Step picker

Adds a step to a workflow: search or browse triggers, actions, logic and agents, then drop it where you clicked.

Loading preview…

Install

  1. 1

    Run this command in your Tailwind CSS project. It adds components/ai/step-picker-palette.tsx and installs its dependencies.

    $ npx shadcn@latest add https://gradientdeck.com/ai-components/r/step-picker-palette.json

Usage & API

Example

step-picker-palette.tsx
import { StepMark } from "@/components/ai/step-picker-palette"

<StepMark
  template={template}
/>

Props StepMark

PropType & descriptionRequired
templateStepTemplateRequired
sizenumberOptional

Dependencies

  • React
  • Tailwind CSS
  • motion
  • lucide-react
Implementation notes

The palette is a dialog titled as adding a step, and it names the step it will follow when you pass one. Search steps filters the list, and clear wipes the query. Category tabs are All, Triggers, Actions, Logic, AI and Apps. With an empty query, a Recent group leads, then the categories. Each row is the mark, the name, the app and the blurb. Enter picks the active row. Nothing matching the query says so. The preview shows a short canvas fragment, a draft workflow, and the palette opening from a plus after the last step. Recent ids are remembered only in that preview's state, capped at three.

Choosing a layout

Use the palette when the canvas is open and the person is browsing, or when recent steps should be one keystroke away. Use the inline list when the workflow is a vertical sequence and the natural gesture is a plus between two rows, with a guess at what usually comes next. The inline list is a bad fit for a free-form graph. It inserts at an index.

The settings of the step, once it exists, are the step inspector, including the last run's input and output. The picker does not edit a prompt or a retry policy. It only chooses the template. Triggers that start an agent outside a canvas, such as a webhook, have their own screens.

Does the palette remember recent steps for the next visit?

It shows the recent ids you pass, most recent first, and only when the search is empty. It does not write to storage. The preview keeps three ids in its own state after each pick. A real app would pass the list it wants shown.

Where does an inline insert go?

onInsert receives the index after the row whose plus was used, and the template. The list does not reorder existing steps. Remove deletes by id. Suggestions are whatever suggest returns for the previous step, not a fixed catalog.