Examples
Default
Negative
Small
With File Name
Player
Props
VoiceNote
A voice-note audio player: a play/pause control, an amplitude waveform, and a timestamp — for voice messages and audio attachments in a conversation. Two modes: passsrc for a self-contained player that decodes the waveform, plays real audio, tracks live progress and is seekable; or omit src and drive it with playing/progress + onPlayPause for a presentational, fully-controlled voice note. flat renders a compact dotted preview and negative adapts it to dark message bubbles.
Called with the next playing state when the play/pause control is pressed.
Playback progress (0–1) for the presentational mode. When set, the waveform splits into played/unplayed bars (the “Listening” state). Ignored when
src is set (progress comes from the media element).URL of the audio to play. When set, the component manages a real
<audio> element: it decodes the waveform, plays/pauses, tracks live progress and is seekable — waveform/progress are derived automatically. Leave unset for a presentational, fully-controlled voice note.Amplitude values (0–1), one per bar. Ignored when
src is set. Falls back to a built-in pattern.Exported types
Also exported from@fanvue/ui: VoiceNoteProps, VoiceNoteSize, VoiceNoteVariant.
Setup: Installation · Theming