{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "live-waveform-demo", "registryDependencies": [ "https://ui.elevenlabs.io/r/live-waveform.json", "button" ], "files": [ { "path": "examples/live-waveform-demo.tsx", "content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { LiveWaveform } from \"@/components/ui/live-waveform\"\n\nexport default function LiveWaveformDemo() {\n const [active, setActive] = useState(false)\n const [processing, setProcessing] = useState(false)\n const [mode, setMode] = useState<\"static\" | \"scrolling\">(\"static\")\n\n const handleToggleActive = () => {\n setActive(!active)\n if (!active) {\n setProcessing(false)\n }\n }\n\n const handleToggleProcessing = () => {\n setProcessing(!processing)\n if (!processing) {\n setActive(false)\n }\n }\n\n return (\n
\n
\n

Live Audio Waveform

\n

\n Real-time microphone input visualization with audio reactivity\n

\n
\n\n
\n \n\n
\n \n {active ? \"Stop\" : \"Start\"} Listening\n \n \n {processing ? \"Stop\" : \"Start\"} Processing\n \n setMode(mode === \"static\" ? \"scrolling\" : \"static\")}\n >\n Mode: {mode === \"static\" ? \"Static\" : \"Scrolling\"}\n \n
\n
\n
\n )\n}\n", "type": "registry:example" } ], "type": "registry:example" }