Plugins - UI toolkit
PluginUi is a panel toolkit for Navigator Plugins. It draws headers, figures, lists, switches, tables, charts, legends and floating boxes in Navigator's own style, so a Plugin's panel looks like part of the app without carrying its own CSS.
The toolkit is optional and in preview. Its calls can still change between versions, so keep the copy you built against inside your Plugin rather than loading a shared one.
This article will cover adding the toolkit to a Plugin, the conventions every component follows, and a short tour of the components. The starter kit already includes it and uses it for its example.

A side bar panel built with the toolkit. Each part of it is shown with its code below.
Download
Download UI toolkitAdding it to a Plugin
- Put plugin-ui.min.js in your plugin folder, beside index.js.
- Copy the loadPluginUi function from loader.js into index.js.
- Build your panel once it resolves, and dispose it when Navigator closes the Plugin.
loadPluginUi fetches plugin-ui.min.js from your Plugin's own ZIP, which Navigator serves at ui.plugin/{pluginId}/file/plugin-ui.min.js. It uses the Plugin's Version as the cache key, so a new upload loads the new copy.
For your editor to suggest the toolkit's calls, keep plugin-ui.d.ts outside the plugin folder and reference it from the top of index.js:
Conventions
- Every component is
ui.add<Thing>(parent, config)and returns a handle. A null parent means the Plugin's own element. Keep the handle, it is how you change what was drawn. - Handles have setX to change something, isX to read a yes or no, and getX to read a value. A setter never fires the component's own change callback, so you can mirror scene state into the panel without loops.
- Passing "title" in a config wraps the component in a titled section. Add "collapsible": true to let the user fold it.
ui.dispose()removes the toolkit's stylesheet, every floating box it made, and every timer and observer it started. Anything else your Plugin added to the scene is still yours to remove.- Class names are generated for each mount, so two Plugins using the toolkit cannot clash, even at different versions. Every node carries a "data-ui" attribute to select on in tests and devtools.
- Colours, sizes and spacing come from the toolkit. It reads Navigator's own theme values, so a panel follows the app rather than a copy of it.
Headers and figures
A header carries the panel's title, a short state on the right and an optional subtitle. A stat grid lays figures out in tiles. "tone" picks the colour of a figure.

Switches and choices
A switch list suits a set of layers the user turns on and off. A segmented control picks one of a few options.

The toolkit also has radios, sliders, dropdowns, field groups, button groups, menus, popovers and modals. Their configs are in plugin-ui.d.ts.
Charts
A chart draws one or more time series, with axes, a readout as the user hovers, reference lines and a marker. A missing value breaks the line rather than joining across the gap.

Tables
A table takes columns and rows, and sorts and pages them itself. Each column can format and colour its cells. For data that pages on a server, pass "load" and the table asks for each page as it is needed.

Floating boxes
A dock is a box over the viewer, placed in one of Navigator's own corners so it sits beside the compass or under the cursor bar instead of covering them. It is how a cursor bar or background Plugin gets a panel, and it suits a legend for what a side bar Plugin draws.

A dock is removed by ui.dispose() along with the rest of the panel.
Themes and size
The default theme is Navigator's: a dark panel with light popovers and modals. Pass "theme" when mounting to choose "dark" or "light" throughout, or on any one component to pin it and everything inside it.
Full reference
plugin-ui.d.ts in the download lists every component, its config and its handle, with a comment on each field. With it referenced from index.js your editor shows the same thing as you type. You can read about testing a panel built with the toolkit in Plugins: Development.