This component no longer exists. It was in sv11-twango’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-09 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Mic Selector
sv11-twango/mic-selectorRemovedComponent
A microphone device picker with live level preview and permission handling.
Live preview
live · rendered by the registry
Rendered by sv11-twango on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add http://sv11.ui.twango.dev/r/mic-selector.jsonSource
1<script lang="ts" module>2 export type MicSelectorProps = {3 /**4 * Selected microphone `deviceId`. Leave unset for uncontrolled mode —5 * the first available device is auto-selected.6 */7 value?: string;8 /** Called when the user picks a different microphone from the dropdown. */9 onValueChange?: (deviceId: string) => void;10 /**11 * Mute state. Leave unset for uncontrolled mode, where the component12 * tracks mute internally.13 */14 muted?: boolean;15 /** Called when the user toggles the mute button. */16 onMutedChange?: (muted: boolean) => void;17 /** Disables the trigger button. */18 disabled?: boolean;19 class?: string;20 };21</script>2223<script lang="ts">24 import Check from "@lucide/svelte/icons/check";25 import ChevronsUpDown from "@lucide/svelte/icons/chevrons-up-down";26 import Mic from "@lucide/svelte/icons/mic";27 import MicOff from "@lucide/svelte/icons/mic-off";28 import { Button } from "$UI$/button/index.js";29 import {30 DropdownMenu,31 DropdownMenuContent,32 DropdownMenuItem,33 DropdownMenuSeparator,34 DropdownMenuTrigger,35 } from "$UI$/dropdown-menu/index.js";36 import { LiveWaveform } from "$UI$/live-waveform/index.js";37 import { cn } from "$UTILS$.js";38 import { useAudioDevices } from "./use-audio-devices.svelte.js";3940 let {41 value,42 onValueChange,43 muted,44 onMutedChange,45 disabled,46 class: className,47 }: MicSelectorProps = $props();4849 const audio = useAudioDevices();5051 let selectedDevice = $state("");52 let internalMuted = $state(false);53 let isDropdownOpen = $state(false);5455 const isMuted = $derived(muted !== undefined ? muted : internalMuted);56 const defaultDeviceId = $derived(audio.devices[0]?.deviceId ?? "");57 const currentDevice = $derived(58 audio.devices.find((d) => d.deviceId === selectedDevice) ??59 audio.devices[0] ?? {60 label: audio.loading ? "Loading..." : "No microphone",61 deviceId: "",62 groupId: "",63 }64 );65 const isPreviewActive = $derived(isDropdownOpen && !isMuted);6667 $effect(() => {68 if (value !== undefined) selectedDevice = value;69 });7071 $effect(() => {72 if (!selectedDevice && defaultDeviceId) {73 selectedDevice = defaultDeviceId;74 onValueChange?.(defaultDeviceId);75 }76 });7778 function handleDeviceSelect(deviceId: string) {79 selectedDevice = deviceId;80 onValueChange?.(deviceId);81 }8283 async function handleDropdownOpenChange(open: boolean) {84 isDropdownOpen = open;85 if (open && !audio.hasPermission && !audio.loading) {86 await audio.loadDevices();87 }88 }8990 function toggleMute() {91// … truncated
What it pulls in
npm packages
Other registry items
