rack-go — equipment-rack layout in Go and WebAssembly

A layout engine that arranges panel modules the way a 19-inch equipment rack does: side by side, each one a whole number of slots wide, wrapping into rows when a row fills, and reflowing when a module is taken out or put back.

Drag a module by its header to move it, or use the console switches to remove one and watch the rest close up. No dependencies; builds with both the standard Go toolchain and TinyGo.

Source code: github.com/0magnet/rack-go. More Go and WebAssembly projects: magnetosphere.net/software.

rack-go

Panel modules laid out the way an equipment rack does: side by side, each one snapped to a whole number of slots, wrapping into rows and reflowing when one is taken out. Not a window manager — nothing overlaps, everything sits on the same pitch. Compose it with one: winbox-go will dock a window to a screen edge, and a rack mounted inside it is a control panel.

Every module here holds the same kind of cell and a different number of them, so the quantization is visible: Envelope needs one slot, Mixer needs several, and their right edges line up with the modules beside them either way.

Drag a module by its header to move it into another gap. Use the switches in the Console to put modules away — the Console has no switch of its own, because the way back has to be somewhere that cannot itself be put away.