Skip to content
Focsd homeFocsd homeFocsd
Forms

Theme presets

Five ready-made presets for Focsd, the default and four brands. Pick one with a single attribute; light, dark and high-contrast themes keep working, and your own brand layers on top.

A preset re-brands Focsd without touching a component: it sets the neutrals, the action colors, the link color, the corner radii and the fonts. Every preset ships a light and a dark theme, and each measured pair passes WCAG 2.2 AA. The high-contrast theme keeps its own colors in every preset.

Pick a preset and a theme: the three screens below change, the rest of this page does not. To give your users the same choice, use the theme picker and theme toggle.

Preset

Sign in

Keep me signed inContinue

New here? Create a workspace

Website relaunch

On track
Write the briefReview the designs
Add taskShare

Notifications

Your first summary arrives on Monday.
EmailChatMentions only

Load the preset’s stylesheet after tokens.css, then name it on the root element. Remove the attribute to return to the default (Wayfinding).

/* With a bundler, in your app's CSS */
@import "@focsd-dev/tokens/tokens.css";
@import "@focsd-dev/tokens/presets/harbor.css";

Without a bundler, link the files from a path your server serves, for example /node_modules/@focsd-dev/tokens/dist/tokens.css and /node_modules/@focsd-dev/tokens/dist/presets/harbor.css. Then set the attribute:

<html data-focsd-brand="harbor"></html>

@focsd-dev/tokens/presets.css holds all four if you switch at runtime. setBrand('harbor') and setBrand(null) from @focsd-dev/tokens set and clear the attribute and reject unknown names; see Helpers for app code. The preset and the theme are independent: data-focsd-brand picks the palette, data-focsd-theme picks light, dark or contrast.

Prismatic is the colorful preset: a near-black (or near-white) canvas with a blue action color, where color marks meaning rather than decoration. Selecting it also turns on color hooks that the other presets leave unset, so the same markup looks calm in Wayfinding and colorful in Prismatic:

  • Avatars get a color from the person’s name; the same name always gets the same color.
  • Tags and badges show their color (blue, violet, pink, red, orange, amber, green, teal); other presets keep the tone.
  • Navigation icons in the dock, sidebar and bottom navigation cycle through the eight hues.
  • Progress bars and sliders fill with a blue-to-pink gradient.
  • Charts draw their series in the category hues.
  • Status tones (positive, caution, critical, info) are more saturated, with deeper tinted backgrounds.

Color is never the only signal: tags keep their text, charts keep their patterns and markers, and the high-contrast theme drops the hues for system colors. The palette is eight tokens, --focsd-accent-1 to --focsd-accent-8, each with a -tint. Components read them through hooks only Prismatic sets, so the other presets stay calm. To turn the colors on in your own brand, set the hooks: --focsd-hue-1 to --focsd-hue-8 and their -tint (usually to your accent tokens), plus --focsd-fill-gradient and --focsd-chart-1 to --focsd-chart-6 if you want those too.

Wayfinding is the default: no attribute and no extra stylesheet. The fonts are named but not shipped; load them yourself, or the stack falls back to the system font.

PresetMoodFontCornersActionAttribute
WayfindingClear, neutral (the default)Atkinson Hyperlegible NextDefaultnone
HarborInstitutional, steadyIBM Plex Sans2px, 4pxharbor
SignalBright, operationalLexend8px, 12pxsignal
MineralTechnical, coolRed Hat Text4px, 6pxmineral
PrismaticDark-first, colorfulInter8px, 12pxprismatic

noFlashScript from @focsd-dev/tokens is a short inline script that applies a stored theme and brand before first paint, from the default focsd-theme and focsd-brand keys. It ignores values it does not know. It reads the default focsd- keys only: if you set a custom storage-key-prefix on the toggle or picker, write your own snippet for that prefix.

<script>/* replace this comment with the value of noFlashScript, exactly */</script>

Put the snippet in the <head> before your stylesheets, and keep the <script> tags tight around it: no space, no new line between <script> and the first character, or between the last character and </script>. A Content Security Policy hash covers the text byte for byte, so extra whitespace changes the hash and the browser blocks the script. If you use a Content Security Policy, allow it by hash with noFlashHash.

Presets sit in the focsd.preset layer, between the tokens and your brand. The layer order is focsd.tokens, then focsd.preset, then focsd.brand, so a rule in focsd.brand (or any unlayered rule) beats the preset. Start from a preset in the theme builder and change one color; the generated CSS declares the order for you.