Aurora AI Mic Selector
aurora-dinglebear-ai/aurora-ai-mic-selectorFreeBlock
Aurora-native mic selector parity surface from AI Elements.
Install it
npx shadcn@latest add https://aurora.dinglebear.ai/r/aurora-ai-mic-selector.jsonSource
1"use client"23/**4 * Aurora MicSelector — microphone picker with a live input-level meter + mute.5 *6 * Visual layer lives in registry/aurora/styles/aurora-components.css7 * (`@layer aurora-components`, reading only `--aurora-*` tokens) so it renders8 * identically in dark + `.light`. Architecture stays shadcn/registry-grade: a Radix `Select`9 * for device choice, `forwardRef`, `displayName`, `React.memo`, full a11y on the10 * mute toggle (`aria-pressed` + `aria-label`), and the original prop/escape-hatch11 * API (`value`/`defaultValue`/`onValueChange`/`name`/`disabled`/`required`/12 * `triggerId`/`triggerLabel`).13 */1415import * as React from "react"16import { Mic, MicOff } from "lucide-react"17import {18 Select,19 SelectContent,20 SelectGroup,21 SelectItem,22 SelectTrigger,23 SelectValue,24} from "@/registry/aurora/ui/select"25import { Button } from "@/registry/aurora/ui/button"26import { cn } from "@/lib/utils"2728export interface MicSelectorProps extends React.HTMLAttributes<HTMLDivElement> {29 /** Available input devices, listed in the dropdown. */30 devices: string[]31 /** Controlled selected device. */32 value?: string33 /** Uncontrolled initial device (defaults to `devices[0]`). */34 defaultValue?: string35 onValueChange?: (value: string) => void36 /** Form field name for the underlying select. */37 name?: string38 disabled?: boolean39 required?: boolean40 /** `id` wired onto the select trigger (label association). */41 triggerId?: string42 /** Accessible label for the select trigger. Defaults to "Microphone". */43 triggerLabel?: string44 /** Controlled mute state for the toggle. */45 muted?: boolean46 /** Uncontrolled initial mute state. */47 defaultMuted?: boolean48 onMutedChange?: (muted: boolean) => void49}5051// Styles: registry/aurora/styles/aurora-components.css (@layer aurora-components).5253// Bar layout: varying widths (in flex units) with a peaking dot near center.54const BAR_WEIGHTS = [1, 1.2, 1.6, 1.4, 2, 1.5, 1.4, 1.8, "peak", 1.9, 1.5, 1.3, 1.7, 1.4, 2, 1.6, 1.3, 1.8, 1.4, 1.2]5556// ─── Component ──────────────────────────────────────────────────────────────5758const MicSelector = (59 { ref,60 devices,61 value,62 defaultValue,63 onValueChange,64 name,65 disabled,66 required,67 triggerId,68 triggerLabel,69 muted,70 defaultMuted,71 onMutedChange,72 className,73// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora AI Actionaurora-ai-action | aurora | Blocks | Free | 1 dep | |
| Aurora AI Actionsaurora-ai-actions | aurora | Blocks | Free | 1 dep | |
| Aurora AI Agentaurora-ai-agent | aurora | Blocks | Free | 1 dep | |
| Aurora AI Image Gridaurora-ai-ai-image-grid | aurora | Blocks | Free | 1 dep | |
| Aurora AI Attachmentsaurora-ai-attachments | aurora | Blocks | Free | 1 dep | |
| Aurora AI Audio Playeraurora-ai-audio-player | aurora | Blocks | Free | 1 dep | |
| Aurora AI Branchaurora-ai-branch | aurora | Blocks | Free | 1 dep | |
| Aurora AI Canvasaurora-ai-canvas | aurora | Blocks | Free | 1 dep |
