affectUI › Illustrations › Product scenes

Agent Mode

A close crop of a chat composer on a soft gradient, where a cursor comes over to switch on the Agent pill and the placeholder turns into a task.

Part of affectUI Pro. Install: npx shadcn@latest add https://www.affectui.com/r/agent-mode.json · Import from @/components/ui/agent-mode

When to use

  • Feature sections and launch posts for an agent mode in a chat product – the switch from asking to handing over a task, in one gesture
  • Bento grids and hero sides – it fills its box with its own gradient, so it needs no background behind it
  • Still images and OG pictures – active holds it on, with the cursor on the pill

When not to use

  • As a real composer – nothing in it can be typed or clicked. Use Chat Composer for that
  • On touch-only pages where no one points – it plays on hover; pass active to show it on

Usage

import { AgentMode } from "@/components/ui/agent-mode";

export function Feature() {
  return (
    <section className="grid grid-cols-2 items-center gap-12">
      <div>
        <h2>Hand it the whole task</h2>
        <p>Switch on Agent and it plans, works and checks on its own.</p>
      </div>
      <AgentMode className="h-[480px]" />
    </section>
  );
}

Props

NameTypeDefaultDescription
placeholderstring"Ask anything"The placeholder while agent mode is off
agentPlaceholderstring"Give the agent a task"The placeholder once agent mode is on
labelstring"Agent"The pill's label
agentstring"agent"The agent's id – its 3×3 pixel pattern comes from it
activebooleantrue holds it on, false holds it off – leave it out and it follows the pointer
classNamestringExtra class on the root

Accessibility

  • Decorative: the whole illustration is hidden from screen readers and holds nothing focusable
  • With prefers-reduced-motion the cursor and the pill switch without gliding, and the gradient and caret hold still

Responsive

  • Fills its box (at least 320 × 400px); the composer is always wider than the box, so it is cut at the right edge at any size – scale it with zoom for smaller screens
  • Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"

Requirements

  • React 19

Related

  • Inspect Composer – A chat composer seen like a selection in a design tool – tilted back, with a blue frame, spacing numbers and a red guide walking through its rows
  • Progress Pill – An agent building a report as a slim pill – its pixel mark, the title and how far it is, the step it's on as a subtitle, a thin bar with a shimmer, a soft color glow beneath
  • Chat Composer – Prompt composer with model picker, voice input, app connections and approval request
  • AI Search / Prompt Explorer – What people ask AI assistants – type a prompt on a soft gradient hero and see related searches with their volume, analyse them, and browse popular and trending keywords