Loading component…
Loading component…
Close crop of a chat composer on a soft gradient, where a cursor switches on the Agent pill and the placeholder turns into a task
To reuse this local React demo, copy all files from the Code tab into the same folder, then import AgentMode from ./agent-mode.
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>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| placeholder | string | "Ask anything" | The placeholder while agent mode is off |
| agentPlaceholder | string | "Give the agent a task" | The placeholder once agent mode is on |
| label | string | "Agent" | The pill's label |
| agent | string | "agent" | The agent's id – its 3×3 pixel pattern comes from it |
| active | boolean | true holds it on, false holds it off – leave it out and it follows the pointer | |
| className | string | Extra class on the root |
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"