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 agentInstall RecruiterOS/recruit-ui and add a spoken note to a candidate card with the useCandidateVoiceNote hook.
With the shadcn CLIpnpm dlx shadcn@latest add RecruiterOS/recruit-ui/recruit-workflows

Props

useCandidateVoiceNote, its options

PropTypeWhat it does
onCommitrequired(text: string) => void | Promise<void>Called with the transcript when a person finishes dictating.
titlestringThe trigger's tooltip and the dictation overlay's title.
captionstringThe small caption in the dictation overlay.

useCandidateVoiceNote, what it returns

PropTypeWhat it does
triggerrequiredReactNodeA quiet mic icon action, for a card's header actions.
controlrequiredReactNodeThe dictation control itself, visually hidden. Render it once, anywhere inside the card: the trigger and `open` drive it.
openrequired() => voidOpens 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.