Choose an audio input
Inputs are discovered without starting a recording. Allow microphone access reveals available device names, then releases the temporary stream. The application owns how the selected input is used.
Searches available microphone inputs with explicit permission activation, device-change updates, and recoverable selection states.
Inputs are discovered without starting a recording. Allow microphone access reveals available device names, then releases the temporary stream. The application owns how the selected input is used.
npm install @noorddev/vlak-react
Load the stylesheet once at your app root, then import the components you use.
import "@noorddev/vlak-react/css";
import { MicSelector } from "@noorddev/vlak-react";Per-component imports are available at @noorddev/vlak-react/components/mic-selector.
npx @noorddev/vlak-cli add mic-selector
Adds the component and its dependencies to components/vlak/. Follow the StyleX setup to compile the source in your application.
npx shadcn add https://vlak.dev/r/mic-selector.json
Installs the same source through the shadcn CLI.
"use client";
import { useState } from "react";
import { MicSelector } from "@noorddev/vlak-react";
export function MicrophonePicker() {
const [deviceId, setDeviceId] = useState("");
return <MicSelector label="Microphone" value={deviceId} onValueChange={setDeviceId} />;
}See the integration example to compose these components with your application's model and data.
Searchable microphone choice. The application owns capture and the selected device's use.
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | ||
defaultValue | string | "" | |
onValueChange | (deviceId: string) => void | ||
label | string | "Microphone" | |
disabled | boolean | false |
Also accepts Omit<HTMLAttributes<HTMLDivElement>, "defaultValue">.
The ref reaches HTMLDivElement.
Enumerates inputs without opening a microphone; requestAccess is an explicit user action.
| Keys | Does |
|---|---|
| Type | Filters the microphone list |
| Arrow Down, Arrow Up, Enter | Navigates and chooses an available microphone |
| Escape | Closes the selection list |
| Tab, Enter, Space | Reaches and activates permission or refresh controls |
The same styles are available as CSS. Native HTML provides the static presentation; React or application code supplies state updates and actions.
npm install @noorddev/vlak
import "@noorddev/vlak/css";
<div class="rs-mic-selector"><label class="rs-mic-selector-label" for="microphone">Microphone</label><select id="microphone" class="rs-input"><option>System microphone</option></select><p class="rs-mic-selector-message">Selecting an input does not start recording.</p></div>