React Waveform Viewer

A digital timing-diagram viewer with a WaveDrom-inspired wave notation. Describe each signal as a string of per-cycle characters — clocks, logic levels, buses with data labels, high-impedance, and unknowns — and get a crisp SVG diagram with a cycle ruler, hover cursor, and a live value-at-cursor column, like a wave window in an EDA tool. Ideal for IP documentation, protocol tutorials, and verification reports.

axi4_lite_write — tb_top.dut.s_axi10 ns / cycle
aclkclk
awvalid0
awready0
awaddr[31:0]x
wvalid0
wdata[31:0]x
wready0
bvalid0
bresp[1:0]x
012345678910110x4000_10A0CAFE_F00DOKAY

Hover the diagram to inspect signal values at any cycle.

Installation

npx shadcn@latest add waveform.json

Usage

Loading...

Wave notation

One character per clock cycle:

CharMeaning
pPositive clock pulse (rise at cycle start)
nNegative clock pulse
1Logic high
0Logic low
zHigh impedance (mid-level)
xUnknown / don't care (hatched)
=Bus valid — consumes the next entry of data[] as label
.Extend the previous state one more cycle

Design notes

  • Value-at-cursor column — the panel between signal names and waves shows each signal's value at the hovered cycle (or the last cycle when idle), like the cursor readout in a wave window.
  • Standard drawing conventions — buses render as hexagonal valid-windows with centered mono labels, unknowns as 45° hatching, transitions with a consistent 3px slew.
  • Print-safe — pure SVG with hairline cycle grid; no animation, no gradients.

Props

Waveform

PropTypeDefaultDescription
signalsWaveSignal[]Signals to render, top to bottom
titlestringHeader label, e.g. scope path or file name
timescalestringRight-aligned header note, e.g. "10 ns / cycle"
cycleWidthnumber40Pixel width of one cycle

WaveSignal

PropTypeDefaultDescription
namestringSignal name shown in the left column
wavestringPer-cycle wave characters (see notation)
datastring[]Labels consumed by = cycles, in order