Skip to content
Sign upGet access
MicrointeractionsAuto titleMenu

Auto title

A chat that names itself in front of you, written in behind the kit's square caret.

When the generated title arrives, New chat steps back and the title is written in behind the kit's square caret.

When the generated title arrives, the placeholder steps back and the new title is written in from the start, with the kit's square caret leading the line like the pen that is writing it; then the caret lifts away. Renaming by hand later writes the same way. One line, no layout jump: the box takes the new width as it is written.

Installation

$ pnpm dlx shadcn@latest add https://chatcn.dev/r/auto-title.json

Usage

tsx
import { AutoTitle } from "@/components/ui/chatcn/auto-title"

<AutoTitle title={chat.title ?? ""} placeholder="New chat" />

Props

PropTypeNotes
titlestringChanging it writes the new one in
placeholderstringDefault "New chat"

Accessibility

  • The title is announced once, politely, when it changes; the caret is hidden from screen readers.

Motion

  • A linear clip-path reveal with the caret on the same timing, about 40 ms a letter. Reduced motion: it swaps.