recruit/candidate-voice-note · useCandidateVoiceNote
Voice note
A hook that wires a card's mic trigger to a hidden dictation control, so a note can be spoken from the header.
Riley Okafor
Press the mic and speak a note.
Install
With your coding agent
Install RecruiterOS/recruit-ui and add a spoken note to a candidate card with the useCandidateVoiceNote hook.With the shadcn CLI
pnpm dlx shadcn@latest add RecruiterOS/recruit-ui/recruit-workflowsProps
useCandidateVoiceNote, its options
| Prop | Type | What it does |
|---|---|---|
| onCommitrequired | (text: string) => void | Promise<void> | Called with the transcript when a person finishes dictating. |
| title | string | The trigger's tooltip and the dictation overlay's title. |
| caption | string | The small caption in the dictation overlay. |
useCandidateVoiceNote, what it returns
| Prop | Type | What it does |
|---|---|---|
| triggerrequired | ReactNode | A quiet mic icon action, for a card's header actions. |
| controlrequired | ReactNode | The dictation control itself, visually hidden. Render it once, anywhere inside the card: the trigger and `open` drive it. |
| openrequired | () => void | Opens the dictation overlay, for a host control of its own. |
Data
The component takes plain values and callbacks and keeps no records of its own. Pass it yours, from the Kith data layer or from a backend you already run.