KQ-812 · RECALL/HINT
Recall Hint
A composer with a memory beside it. When a memory applies to the draft a hint chip rises in the toolbar row on snap and breathes once, a single scale tween that begins as it lands; pressing it inserts the memory as context, the same chip travelling up into the context row through a shared layoutId on snap while the row's measured height glides open, and a removed chip leaves on the exit ease. Enter sends, Shift+Enter breaks the line, Tab reaches the hint and its dismiss button, and Escape in the field dismisses the hint until a different memory applies.
KQ-812 · RECALL/HINT
No memory applies · type invoice, yard or pay
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/recall-hint
Props
- memory
- RecallMemory | null
- default null
- The memory that applies to the draft, with an id and a fact, or null while none does; the host decides what applies.
- value / defaultValue
- string
- default ""
- Controlled or initial draft.
- onValueChange
- (value: string) => void
- default —
- Fires on every edit of the draft.
- context / defaultContext
- RecallMemory[]
- default []
- Controlled or initial list of inserted memories, shown as chips above the field.
- onContextChange
- (context: RecallMemory[]) => void
- default —
- Fires when a memory is inserted or removed.
- onInsert
- (memory: RecallMemory) => void
- default —
- Fires from the hint press after the memory joins the context.
- onDismiss
- (memory: RecallMemory) => void
- default —
- Fires from Escape in the field or the hint's dismiss button.
- onSend
- (value: string, context: RecallMemory[]) => void
- default —
- Fires from Enter or the send button with the trimmed draft and the context attached.
- placeholder
- string
- default "Write a reply"
- Placeholder for the empty field.
- label
- string
- default —
- Names the textarea for assistive technology.
| Prop | Type | Default | Description |
|---|---|---|---|
| memory | RecallMemory | null | null | The memory that applies to the draft, with an id and a fact, or null while none does; the host decides what applies. |
| value / defaultValue | string | "" | Controlled or initial draft. |
| onValueChange | (value: string) => void | — | Fires on every edit of the draft. |
| context / defaultContext | RecallMemory[] | [] | Controlled or initial list of inserted memories, shown as chips above the field. |
| onContextChange | (context: RecallMemory[]) => void | — | Fires when a memory is inserted or removed. |
| onInsert | (memory: RecallMemory) => void | — | Fires from the hint press after the memory joins the context. |
| onDismiss | (memory: RecallMemory) => void | — | Fires from Escape in the field or the hint's dismiss button. |
| onSend | (value: string, context: RecallMemory[]) => void | — | Fires from Enter or the send button with the trimmed draft and the context attached. |
| placeholder | string | "Write a reply" | Placeholder for the empty field. |
| label | string | — | Names the textarea for assistive technology. |