Design system #
Visual and structural conventions for the toolkit UI. The tokens and shared classes live in
src/style.css, the app shell in src/App.vue, and the shared controls in
src/components/. Setup and task commands are in the README.
The look follows frytg.digital and the dashy dashboard: a dark green ground, hairlines instead of filled cards, flush corners, and yellow for interaction.
Palette #
Colours are Tailwind theme tokens in the @theme block, so each one works as a utility (bg-dark-greeny,
text-off-white/70). Use opacity modifiers instead of new hex values.
dark-greeny(#181d16): header and control panels. The darkest surface; never use black.mid-dark-greeny(#293126): page ground and the canvas area behind a tool's output.greeny(#3e4939): text on a yellow fill, and selected text.yellow(#ffff11): hover, active and focus states.orange(#f09139): warnings and error notices.off-white(#ecebe3): primary text. Prefer it overwhite.fake-gray(#d7e2cc): the base that the line and muted tokens mix from. Don't use it directly.
Derived tokens #
A :root block mixes the palette into a small line and surface scale. Prefer these over a new color-mix().
--line(fake-grayat 20%): default hairline border.--line-strong(fake-grayat 36%): emphasis border, slider tracks, axis lines.--muted(fake-grayat 72%): labels and secondary text.--faint(fake-grayat 55%): tertiary text, hints, units.--surface-1(dark-greeny): panel fill.--surface-2(off-whiteat 4.5%): inset fields, row hover.--surface-3(off-whiteat 8%): raised control fill.--radius(0): corner radius of every control.--safe-top,--safe-right,--safe-bottom,--safe-left: iOS safe-area insets.--panel-width(min(20rem, 100%)): width of an open control panel.
The line, muted, faint and surface percentages match dashy's. Change them in both projects, or the two apps drift apart.
Reference a token with an arbitrary value (border-[var(--line)], text-[var(--muted)]). That is the spelling the
codebase uses throughout.
Shapes and type #
- Corners are flush. Every control reads
--radius, so change corners there and never per component. Only round things that are round by nature, such as a legend dot. - Geist Sans is the default face. Geist Mono is for data: coordinates, counts, hex values, IPs, timestamps.
Add
tabular-numswherever numbers line up in a column. - Fonts are not in the repo.
just fontsdownloads them intosrc/style/, which is gitignored. Without that stepjust devuses a locally installed Geist if there is one, and the system font otherwise.just buildruns the download itself. - Type scale. Sizes are fixed pixel values, written as arbitrary utilities (
text-[13px]).- 13px: control rows and body text in a panel.
- 12px:
.ui-label, detail rows, notices. - 11px: hints, units and mono readouts beside a slider.
- 10px: micro labels only, such as a stat label or a table header. Never running text.
- 15px semibold: the title of the loaded item, such as an activity name.
- 22px mono semibold: a headline number in a stat tile.
- 14px: header tabs and the wordmark.
- Case. The header is lowercase: the tabs get it from
.ui-tab. Text inside a tool stays as written, in sentence case. Don't addtext-transformto.ui-label,.ui-btn,.ui-chipor.ui-seg-btn: row labels inside the panels are plain text without a shared class, so only half the panel would change case.
App shell #
The header has two rows on --surface-1, with a hairline under each.
■ FRYTG SOCIALS blurb of the active tool frytg.digital ↗ repo ↗
0 overview 1 halftone 2 gpx overlay 3 gpx viewer 4 elevation lines 5 dmarc viewer
- Top row. The wordmark, the active tool's
blurbin muted lowercase (hidden belowsm), and the external links. The wordmark links to the overview. - Tab row. An overview tab, then one
.ui-tabper tool, inside a.ui-tab-row. The active tab is a solid yellow block (is-active); hover is a--surface-2fill. Don't give tabs a border. - Routes. The URL hash names the open tool:
#gpx-vieweropens the tool with thatid. No hash, or a hash that matches no tool, shows the overview. Tabs and overview tiles are plain links, so the back button, a reload and open-in-new-tab all work. Switching tools unmounts the previous one, so its unsaved state is lost. - Shortcuts.
0opens the overview and1…9open the first nine tools. A tenth tool gets a tab without a number. The handler ignores keys typed into aninput,textareaorselect, and keys pressed with a modifier. - Order. Tabs follow the order of
FLEET_TOOLSinsrc/tools/registry.ts, so reordering that array also changes which number opens which tool. - Narrow screens. Below
lgthe tab row scrolls sideways with faded edges, and the active tab scrolls itself into view. Fromlgup the row wraps. The row's padding is set in.ui-tab-rowand equals the fade width, so the first tab is not dimmed. Don't add padding utilities to the row. - Fixed height.
bodyhasoverflow: hiddenand the app fills the viewport. The page itself never scrolls, so each tool must scroll its own regions. - Safe areas. The header pads
--safe-top. Each tool pads its own left, right and bottom edges.
Overview page #
ToolOverview is the start page. It lists every entry of FLEET_TOOLS, so a new
tool appears without an edit here.
- Ground.
dark-greeny, in a centredmax-w-5xlcolumn. Unlike a tool, this page scrolls as a whole. - Tiles. One link per tool in a
gap-pxgrid: the shortcut number in muted mono, thelabelat 18px semibold, thesummarysentence at 13px, and an "Open …" button-look at the bottom. The whole tile is the link. - Outlines. A tile draws its 1px outline as a
box-shadow, and the grid hasp-px. Neighbours then share one hairline, and an empty cell in the last row stays empty. Don't space tiles withgap-2or give them a border. - Hover and focus. The tile fills yellow with
dark-greenytext, and the button inverts todark-greenywith yellow text.
Tool layout #
A tool fills the area under the header with a control panel on the left and its output on the right.
┌ panel ──────┬ output ─────────────────────────┐
│ ‹ │ │
│ section │ canvas, map, chart or table │
│ controls │ │
│ ─────────── │ │
│ actions │ │
└─────────────┴─────────────────────────────────┘
- Root.
relative flex h-full bg-mid-dark-greeny. - Panel. An
aside.ui-panel-shellholding a.ui-panel-toggle-rowwith the sharedPanelToggle, then a.ui-panel-bodywith the controls. Addingis-collapsedshrinks the shell to a 2.75rem strip and hides the body. - Initial state. Use
initialPanelOpen()fromsrc/tools/panel-state.ts. The panel starts open from 768px and closed below it. The value is read once, so resizing the window later does not reopen or close the panel. - Panel sections. A
.ui-labelheading, then the controls. Pin export or destructive actions to the bottom of the panel, above a--linetop border. - Stat tiles. Headline numbers sit in a two-column grid (
grid-cols-2 gap-4): a 10px uppercase label in--faintwithtracking-[0.08em], then the value in 22px mono semibold withtabular-nums. SeeHeroStats. There is no shared class for this yet, so copy the classes from there instead of inventing a variant. - Output.
min-w-0 flex-1. Overlays on the output, such as notices and map controls, sit onbg-dark-greeny/90with a--lineborder.
Controls #
Shared classes carry the ui- prefix and take their state from an is- class. Hover and active states are yellow:
a yellow fill with greeny text on buttons, chips, segments and toggles, and yellow text on .ui-link. Header tabs
are the exception (see App shell).
.ui-label: section heading or field caption, 12px in--muted..ui-btn: standard button. Add.ui-btn-primaryfor the one main action of a panel..ui-btn-ghost: secondary action without a border..ui-link: text-only action, such as reset..ui-chip: one of several exclusive options when the labels vary in length.is-activemarks the choice..ui-segwith.ui-seg-btn: equal-width segmented choice. UseSegmentedControlinstead of writing the markup..ui-togglewith.ui-toggle-knob: rectangular on/off switch.is-onmarks the on state..ui-field: bordered box around an input or select. The border turns yellow on focus.input[type='range']: styled globally. UseSliderControlfor a labelled slider with a value readout.input[type='color']: styled globally. UseColorFieldfor a swatch with a hex field.
Controls are sized for touch first. Below 768px they have a minimum height between 2rem and 2.75rem. From 768px up the
minimum height is removed and the padding tightens. Add a new control to the @media (min-width: 768px) block at the
end of the stylesheet instead of shipping one size for both.
Class naming and overrides #
- Prefixes are enforced. The lint rule
tailwindcss/no-unknown-classesin.oxlintrc.jsonfails on any class that is not a Tailwind utility, unless it starts withui-oris-. Name a new shared classui-*and its statesis-*. - A utility cannot override a
ui-class. The shared classes are written outside a cascade layer, and Tailwind puts utilities inside one, so the shared class wins whatever the order in theclassattribute.ui-field min-h-0keeps the field's own minimum height, and nothing reports it. To vary a property that aui-class sets, change the class or add anis-modifier in the stylesheet. - Utilities still add. A utility works for any property the class does not set, such as width, margin or text
colour on
.ui-field. - Keep element rules narrow. The same cascade applies to any unlayered rule on a bare element. A global
button, input, select { font: inherit }once sat in the stylesheet and silently cancelled everytext-[…],font-monoandfont-mediumutility on those elements. Tailwind's preflight already does that reset inside a layer, so don't add it back. The remaining element rules only targetinput[type='range']andinput[type='color']. - Lint does not check that a
ui-*class exists. The prefix exemption lets a misspelled or never-defined class through, and the element renders unstyled. After adding one, check that the stylesheet defines it.
Adding a tool #
- Create
src/tools/<id>/<Name>Tool.vue, withcomponents/for its Vue parts andengine/for logic that has no DOM. - Follow the tool layout: panel shell on the left, output on the right.
- Add an entry to
FLEET_TOOLSinsrc/tools/registry.ts.idbecomes the URL hash,labelthe tab and the tile title,blurbthe line next to the wordmark, andsummarythe sentence on the overview tile. Keep the label to one or two words. The position in the array sets the number shortcut. - Add the tool to the list in the README.
- Run
just lint.