Lab

Value Display

An audio value as it reads, in steady monospace figures, for tempo, level, frequency, pan, percent, semitones and time.

Audio UI

An audio value as a DAW shows it, in monospace figures that do not jump as they change: 120.00 BPM, -6.0 dB, 1.2 kHz, L 30, 50 %, +3 st, 1:02.345.

Installation

pnpm dlx shadcn@latest add @audio-ui/value-display

Usage

import { formatValue, ValueDisplay } from "@/components/audio-ui/value-display";

<ValueDisplay kind="db" label="Gain" value={gain} />

// The same text, for a title or an announcement.
formatValue(gain, "db");
kindValueReads
bpmbeats per minute120.00 BPM
dbdecibels, -Infinity for silence-6.0 dB, -∞ dB
hzhertz440 Hz, 1.2 kHz
pan-1 to 1L 30, C, R 100
percent0 to 150 %
semitonessemitones+3 st
timeseconds1:02.345

API reference

Props · 4

Built by Ouest Labs, the source code is available on GitHub.
RSS