AmplifierDiagram
An ASCII amplifier: a small calm wave goes in, a gain slider scales it, and a large wave comes out — a metaphor for what AI does to your effort, with a live dB readout.
Install
pnpm add @fractaldesign/machines-ui import '@fractaldesign/machines-ui/style.css';
import { AmplifierDiagram } from '@fractaldesign/machines-ui';Preview
Signal power: +21.0 dB
<AmplifierDiagram gain={3.5} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| gain | number | 3.5 | Starting gain multiplier. Default 3.5. |
| interactive | boolean | true | Show the gain slider and dB readout. Default true. |
| animated | boolean | true | Animate the waves. Default true. Reduced motion freezes them. |
| class | string | '' |
API
- class forwarded to the outer element
- motion runs live; set animated={false} to freeze
- a11y honours prefers-reduced-motion
Theming
CSS custom properties this component reads.
- --border
- --graph-accent
- --text-primary
- --text-secondary
src/lib/components/diagram/AmplifierDiagram.svelte