keshon

Turn

Component

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";

export default function TurnDemo() {
  return (
    <div className="w-full max-w-xl mx-auto flex flex-col gap-6 p-6 bg-background text-foreground">
      <Turn who="You" from="user" time="14:02">
        Add a share bar above the history strip, and let one legend key both.
      </Turn>
      <Turn
        who="Agent"
        time="14:02"
        tokens={1284}
        duration={4.1}
        locale="en-GB"
      >
        I'll put the bar above the strip and let the swatch read the tone.
      </Turn>
    </div>
  );
}

More by keshon

View all
  • List

    List

    4
  • Accordion

    Accordion

  • Sparkline

    Sparkline

  • Streaming Text Caret

    Streaming Text Caret

  • Thinking

    Thinking

  • Lanes

    Lanes

  • Key Value List

    Key Value List

  • Status Dot

    Status Dot