About
A chat-turn block that shows who spoke, what they said, and its cost (tokens/duration), with optional reasoning, result and action slots for building an agent/assistant conversation thread.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Turn to your project and fits it to your theme.
Code
How Turn is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import Turn from "@/components/ui/turn";
const answerActions = (
<>
<button type="button" className="text-xs">
Copy
</button>
<button type="button" className="text-xs">
Retry
</button>
<button type="button" className="text-xs">
More
</button>
</>
);
export default function TurnActionsDemo() {
return (
<div className="w-full max-w-xl mx-auto flex flex-col gap-6 p-6 bg-background text-foreground">
<Turn
who="Agent"
time="14:02"
tokens={1284}
duration={4.1}
locale="en-GB"
actions={answerActions}
>
I'll put the bar above the strip and let the swatch read the tone.
</Turn>
</div>
);
}








