BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/ui/voice-form-01

voice-form-01

elevenlabs/voice-form-01
FreeBlock

Voice-fill form

Install it

npx shadcn@latest add https://raw.githubusercontent.com/elevenlabs/ui/main/apps/www/public/r/voice-form-01.json

Source

blocks/voice-form-01/page.tsxraw.githubusercontent.com/elevenlabs/ui/main/apps/www/public/r/voice-form-01.json · first 6 KB
1"use client"
2
3import { useCallback, useEffect, useRef, useState } from "react"
4import { zodResolver } from "@hookform/resolvers/zod"
5import { useForm } from "react-hook-form"
6
7import { cn } from "@/lib/utils"
8import { voiceToFormAction } from "@/app/voice-form/actions/voice-to-form"
9import {
10 exampleFormSchema,
11 ExampleFormValues,
12} from "@/app/voice-form/schema"
13import { Button } from "@/components/ui/button"
14import {
15 Card,
16 CardContent,
17 CardDescription,
18 CardHeader,
19 CardTitle,
20} from "@/components/ui/card"
21import {
22 Form,
23 FormControl,
24 FormField,
25 FormItem,
26 FormLabel,
27 FormMessage,
28} from "@/components/ui/form"
29import { Input } from "@/components/ui/input"
30import { VoiceButton } from "@/components/ui/voice-button"
31
32const AUDIO_CONSTRAINTS: MediaStreamConstraints = {
33 audio: {
34 echoCancellation: true,
35 noiseSuppression: true,
36 autoGainControl: true,
37 },
38}
39
40const SUPPORTED_MIME_TYPES = ["audio/webm;codecs=opus", "audio/webm"] as const
41
42function getMimeType(): string {
43 for (const type of SUPPORTED_MIME_TYPES) {
44 if (MediaRecorder.isTypeSupported(type)) {
45 return type
46 }
47 }
48 return "audio/webm"
49}
50
51export default function Page() {
52 const [isRecording, setIsRecording] = useState(false)
53 const [isProcessing, setIsProcessing] = useState(false)
54 const [error, setError] = useState("")
55 const [success, setSuccess] = useState(false)
56
57 const mediaRecorderRef = useRef<MediaRecorder | null>(null)
58 const audioChunksRef = useRef<Blob[]>([])
59 const streamRef = useRef<MediaStream | null>(null)
60
61 const form = useForm<ExampleFormValues>({
62 resolver: zodResolver(exampleFormSchema),
63 defaultValues: {
64 firstName: "",
65 lastName: "",
66 },
67 mode: "onChange",
68 })
69
70 const cleanupStream = useCallback(() => {
71 if (streamRef.current) {
72 streamRef.current.getTracks().forEach((track) => track.stop())
73 streamRef.current = null
74 }
75 }, [])
76
77 const processAudio = useCallback(
78 async (audioBlob: Blob) => {
79 setIsProcessing(true)
80 setError("")
81 setSuccess(false)
82
83 try {
84 const audioFile = new File([audioBlob], "audio.webm", {
85 type: audioBlob.type,
86 })
87
88 const result = await voiceToFormAction(audioFile)
89
90 if (result.data && Object.keys(result.data).length > 0) {
91 Object.entries(result.data).forEach(([key, value]) => {
92 if (value) {
93 form.setValue(key as keyof ExampleFormValues, value as string, {
94// … truncated

What it pulls in

npm packages

  • @elevenlabs/elevenlabs-js
  • ai
  • zod

Other registry items

  • https://ui.elevenlabs.io/r/voice-button.json
  • https://ui.elevenlabs.io/r/live-waveform.json
  • button
  • card
  • form
  • input

Files it writes

  • registry/elevenlabs-ui/blocks/voice-form-01/page.tsx
  • registry/elevenlabs-ui/blocks/voice-form-01/schema.ts
  • registry/elevenlabs-ui/blocks/voice-form-01/actions/voice-to-form.ts

Facts

Registry
shadcn/ui
Type
registry:block
Access
Free
Files written
3
Licence
MIT
In the index
at or before 2026-08-08
Last confirmed
3 days ago

Go to the source

ui.elevenlabs.io elevenlabs/ui on GitHub Raw registry item This item as JSON

More from shadcn/ui

All 50 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
music-player-01music-player-01shadcn/uiBlocksFreeno deps
music-player-02music-player-02shadcn/uiBlocksFreeno deps
pong-01pong-01shadcn/uiBlocksFree1 dep · 6 files
realtime-transcriber-01realtime-transcriber-01shadcn/uiBlocksFree2 deps · 3 files
speaker-01speaker-01shadcn/uiBlocksFreeno deps · 2 files
transcriber-01transcriber-01shadcn/uiBlocksFree2 deps · 2 files
voice-chat-01voice-chat-01shadcn/uiBlocksFree1 dep
voice-chat-02voice-chat-02shadcn/uiBlocksFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex