Command Palette

Search for a command to run...

0GitHub stars
Components

FM Radio Tuner

A tactile retro FM radio tuner widget with a dot-matrix LCD readout, spring-animated analog dial scale, wheel and drag scrubbing, and optional Web Audio click feedback.

Loading…

Features

  • Custom pixel-matrix SVG glyph renderer for the band badge, frequency readout, and unit label on a backlit teal LCD display.
  • Spring-physics analog dial scale supporting pointer drag scrubbing, click-to-seek, mouse wheel tuning, and keyboard navigation.
  • Optional synthesized Web Audio tactile click feedback on each frequency step with zero external audio assets.
  • Supports both controlled (value) and uncontrolled (defaultValue) modes, plus prefers-reduced-motion accessibility.

Use cases

  • Interactive audio players, podcast or internet radio interfaces, and frequency pickers.
  • Skeuomorphic hardware widgets and tactile numerical range controls.

Installation

pnpm dlx shadcn@latest add @abushaidislam/fm-radio-tuner

Usage

import { FmRadioTuner } from "@/components/fm-radio-tuner"
export default function RadioPage() {
  return (
    <div className="flex min-h-[440px] items-center justify-center p-6">
      <FmRadioTuner defaultValue={101.4} sound />
    </div>
  )
}

API reference

FmRadioTuner

Prop

Type

Accessibility

  • Uses role="slider" with aria-valuemin, aria-valuemax, aria-valuenow, aria-valuetext, and aria-disabled.
  • Supports keyboard tuning with ArrowLeft/ArrowRight/ArrowUp/ArrowDown (hold Shift for 10x step), PageUp/PageDown, and Home/End.
  • Respects prefers-reduced-motion by snapping immediately without spring interpolation or scale transitions.

License and usage

  • Free to use and modify in both personal and commercial projects.
  • Attribution is appreciated but not required.
  • Released under the MIT License.

Was this helpful?

Command Palette

Search for a command to run...