Widgets

The working parts of this system:
controls, frames, and icons

by Roger Wang

written 2026-10-31, reference draft

Abstract

The site's system, extended for tools. Pages stay black and white; tools add colour, but only as a key: each part of an interface has one muted hue, marked the same way everywhere. Everything else (frames, states, icons) is shape and weight on the character grid. The same rules are written out for terminals at the end.

Colour keys

One hue per area of a tool, always drawn the same way: a thick solid stroke, and the label on a pale wash of the same hue. Text stays black. The hues are muted and spread round the colour wheel, chosen for being visible and for being told apart from one another.

A console

The widgets were made for one job above all: a browser console that controls something running elsewhere, such as a queue of analysis jobs on a server. The console page is a working example with a simulated backend. It uses the compact density, where the same widgets sit on a tighter grid: add gg-compact to any container and everything inside scales together.

Components

Without a key the widgets are black and white, like the rest of the site; add k-run, k-field and so on to any of them to join an area.

Buttons

Fields and choices

already in the plate map
Options
Live

Tabs

Choose the variants. Arrow keys move between tabs.

Table and tree

  • 2026-10
    • run-01
    • run-03
wellvariantOD600GFP / OD
A1wild type0.821204
A2R110A0.79385
A3T30S0.852210
A4empty0.0412

Example values. Click a heading to sort, a row to select it.

Progress

35%
length unknown
as text, for terminals and logs

Messages

InformationCircle; the info key.
WarningTriangle; a heavier edge.
Delete run-02?

Its two plates and their readings will be removed. This cannot be undone.

Icons

Thirty-eight, on a 20-unit grid with one stroke weight, each two cells wide. Severity is in the outline: circle, triangle, square.

In a terminal

The same marks in character cells: the stroke is a left half block ▌ in the key colour, the label sits on the wash, frames are box-drawing lines, and reverse video stands for the pointer. With truecolor, use these values:

keystroke
run#519962
field#4886B8
select#8E70B0
display#A18B32
param#C67F4D
info#429599
danger#B65A5C


  

Using it

Load site.css and widgets.css, then gg-icons.js and widgets.js. Markup is the interface:

<span class="gg-label k-run">Run</span>
<button class="gg-btn k-run" aria-pressed="true">Pause</button>
<span class="gg-val k-param">12</span>
<table class="gg-table k-field" data-sortable data-select> ... </table>

gg.toast('saved');   gg.progress(el, 0.6);   gg.meter(0.42, 20);
gg.init(newlyAddedElement);   // wires keyboard handling for new widgets