ChatBeats
A reply said one beat at a time, so Okami reads like someone talking: a line written out letter by letter (StreamingText), then what it introduces rising into place, then the next line. Nothing lands before it's been said, and a line holds the next beat until it could be read, about 330 words a minute. Read back — a reload, earlier in the thread — every beat is simply there.
One beat at a time
This is your studio: its name, logo and colours. Change any of it, any time.
Studio
Pele Barber · Ink
This is what you do. Pick the one that fits.
What you do
Barbershop
Read back: every line and card at once.
<ChatBeats
live={!said.has(message.id)}
pending={busy && isLast}
waiting={<Thinking working labels={labels} />}
onDone={() => setRevealed(message.id)}
beats={[
{ key: "a", kind: "text", text: intro, writing: false },
{ key: "b", kind: "block", content: <StudioCard … /> },
]}
/>API
| Prop | Type | Default | Description |
|---|---|---|---|
| beats | ChatBeat[] | — | In the order they're said: a text beat ({ kind: 'text', text, writing }) is written out as an agent's message; a block beat ({ kind: 'block', content }) rises into place once the line before it is written. |
| live | boolean | false | Arriving now: said one beat at a time. Left out, every beat shows at once — a reply read back. |
| pending | boolean | false | More of the reply is still on its way (the turn is running). |
| waiting | ReactNode | — | Shown while everything so far is said and more is coming: Thinking, so a gap is never silent. |
| msPerWord | number | READING_MS_PER_WORD (180) | How long each word of a line holds the next beat. The app reads briskly (about 330 words a minute); a demo for someone new to Okami passes UNHURRIED_MS_PER_WORD (273, about 220 a minute). |
| onDone | () => void | — | Once every beat has settled and nothing more is coming: chips may follow. |
Guidelines
- A card always comes after the words that introduce it — never beside or before them.
- Chips wait for onDone: a choice shown before the question is finished reads as a surprise.
- Only the reply arriving now is live; everything read back is whole at once.