@ldlework/phosphor
v0.1.0
Published
Retrofuture 80s hi-fi UI for React — chrome chassis, OLED glass, single-hue theming.
Readme
@ldlework/phosphor
A React design system in the shape of late-80s / early-90s high-end audio equipment: milled chrome chassis with raised plates, recessed OLED glass, emitted-light pixel typography, a single-hue theme knob.
Install
pnpm add @ldlework/phosphorUse
import '@ldlework/phosphor/styles.css'
import { Display, PushButton, Panel } from '@ldlework/phosphor'
export function Example() {
return (
<Panel style={{ padding: 16 }}>
<Display>
<span className="screen-chip" data-lit="true">
ON AIR
</span>
</Display>
<PushButton>Engage</PushButton>
</Panel>
)
}Theming
One CSS variable drives the whole palette:
:root { --theme-hue: 248; /* try 30 (amber), 145 (green), 320 (magenta) */ }Colour math is OKLCH so perceptual brightness stays constant across hues.
Primitives
Panel— raised chrome plate (the chassis everything else mounts on)Display— dark OLED glass. Raised on its own chrome chassis by default, or recessed into aPanel(raised={false}). Black bezel ring on by default (bezel={false}for a single chamfer). Padding is the standard 16px screen margin;padding={0}is full-bleed. Alsocolor,fill,cursor,screenStyle,screenClassName.PushButton— three-layer pushable buttonModal— backdrop + frame, designed to host aDisplayas the dialogLeverSwitch— two-position 3D rockerSegmentedDisplay— small recessed glass (.screen-embedded) with DSEG7 segmented digitsSegmentedSurface— the glass and glow ofSegmentedDisplay, holding any markupScrubChipRow— horizontal screen-chip row with drag-to-scrub selectionChipToggle— on-screen lit/unlit chipIndexStrip— row of numbered chips on glass, with chrome action tilesHueStrip— 360° OKLCH hue picker on.screen-embeddedglassCodeBlock— recessed code panel with theme-tracking syntax highlightingKnob— rotary knob with an optional baseline, modulation band and glide barArcGauge— small draggable arc with a readoutSlider— linear or log slider on a recessed trackNumberField— recessed numeric field; clamps tomin/maxon commitDropdown— chrome selectTabs— tab row with arrow-key navigationIconPicker— glyph key that opens a grid of options, with hover cardsHelpTooltip— "?" dot with a hover/focus popoverSidePanel— panel docked to a window edge, slid in and out by its tabuseScreenPointer— the mouse on the enclosingDisplay(withcursor), for content that draws its own pointer
