Auto title
A chat that names itself in front of you, written in behind the kit's square caret.
On this page
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
Usage
import { AutoTitle } from "@/components/ui/chatcn/auto-title"
<AutoTitle title={chat.title ?? ""} placeholder="New chat" />Props
| Prop | Type | Notes |
|---|---|---|
title | string | Changing it writes the new one in |
placeholder | string | Default "New chat" |
Accessibility
- The title is announced once, politely, when it changes; the caret is hidden from screen readers.
Motion
- A linear
clip-pathreveal with the caret on the same timing, about 40 ms a letter. Reduced motion: it swaps.