TidalUI

Voice recorder preview

Record or attach a reviewable audio prompt through an injected media adapter.

pro · Forms · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/voice-recorder

Import components/ui/tidal.css, components/ui/voice-recorder.css. Wrap installed components in tidal-scope.

Preview

Voice recorder component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/voice-recorder.css";
import{TidalVoiceRecorder}from"./components/ui/voice-recorder";
export default(p:Parameters<typeof TidalVoiceRecorder>[0])=><div className="tidal-scope"><TidalVoiceRecorder {...p}/></div>;

API and props

TidalVoiceRecorder.adapter (required)
TidalVoiceRecorderAdapter

Required adapter value accepted by this exported component.

TidalVoiceRecorder.consentNotice (required)
ReactNode

Required consent notice value accepted by this exported component.

TidalVoiceRecorder.durationMs (required)
number

Required duration ms value accepted by this exported component.

TidalVoiceRecorder.permission (required)
TidalVoiceRecorderPermission

Required permission value accepted by this exported component.

TidalVoiceRecorder.status (required)
TidalVoiceRecorderStatus

Required status value accepted by this exported component.

TidalVoiceRecorder.title (required)
ReactNode

Required title value accepted by this exported component.

TidalVoiceRecorder.accept
string | undefined

Optional accept value accepted by this exported component.

TidalVoiceRecorder.aria-disabled
undefined

Accessible disabled supplied by the consumer.

TidalVoiceRecorder.aria-label
undefined

Accessible label supplied by the consumer.

TidalVoiceRecorder.attachmentInputProps
AttachmentInputProps | undefined

Optional attachment input props value accepted by this exported component.

TidalVoiceRecorder.attachProps
RecorderActionProps | undefined

Optional attach props value accepted by this exported component.

TidalVoiceRecorder.clip
TidalVoiceClip | null | undefined

Optional clip value accepted by this exported component.

TidalVoiceRecorder.clipAudioProps
ClipAudioProps | undefined

Optional clip audio props value accepted by this exported component.

TidalVoiceRecorder.clipAudioRef
Ref<HTMLAudioElement> | undefined

Optional clip audio ref value accepted by this exported component.

TidalVoiceRecorder.description
ReactNode

Optional description value accepted by this exported component.

TidalVoiceRecorder.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalVoiceRecorder.discardProps
RecorderActionProps | undefined

Optional discard props value accepted by this exported component.

TidalVoiceRecorder.error
ReactNode

Optional error value accepted by this exported component.

TidalVoiceRecorder.footer
ReactNode

Optional footer value accepted by this exported component.

TidalVoiceRecorder.formatDuration
((durationMs: number) => string) | undefined

Optional format duration value accepted by this exported component.

TidalVoiceRecorder.formatLevel
((level: number) => string) | undefined

Optional format level value accepted by this exported component.

TidalVoiceRecorder.headingLevel
"h2" | "h3" | "h4" | "h5" | undefined

Optional heading level value accepted by this exported component.

TidalVoiceRecorder.labels
Partial<TidalVoiceRecorderLabels> | undefined

Optional labels value accepted by this exported component.

TidalVoiceRecorder.level
number | null | undefined

Optional level value accepted by this exported component.

TidalVoiceRecorder.onAdapterError
((error: unknown, action: TidalVoiceRecorderAction) => void) | undefined

Callback invoked when the adapter error interaction is proposed.

TidalVoiceRecorder.pauseProps
RecorderActionProps | undefined

Optional pause props value accepted by this exported component.

TidalVoiceRecorder.resumeProps
RecorderActionProps | undefined

Optional resume props value accepted by this exported component.

TidalVoiceRecorder.startProps
RecorderActionProps | undefined

Optional start props value accepted by this exported component.

TidalVoiceRecorder.stopProps
RecorderActionProps | undefined

Optional stop props value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas