Skip to content
NewService Map: 30 components for hosts, ports and routes

Theming

Components follow your shadcn theme. One extra set of --lumesec tokens adds the accent; --ui-* overrides restyle the custom elements on their own.

View as Markdown

Every component reads the same variables your shadcn/ui components already use: --background, --foreground, --card, --muted, --muted-foreground, --border, --input, --destructive, --font-sans and --font-mono. Change your theme and the components change with it, in light and dark.

On top of that, LumeSec components have one accent, Electric, and a few signal colours. They come from the --lumesec tokens.

Add the accent tokens

npx shadcn@latest add @lumesec/lumesec-theme

Every component installs this item as a dependency, so you usually already have it. It writes the tokens into your global CSS, under :root and .dark, and registers them as Tailwind colours (bg-lumesec, text-lumesec-foreground and so on):

app/globals.css
:root {
  --lumesec: #6219f3;
  --lumesec-foreground: #fafafa;
  --lumesec-soft: #a685ff;
  --lumesec-shine: #3f12b0;
  --lumesec-glint: #c9bdff;
  --lumesec-success: #00a14b;
  --lumesec-warning: #d97706;
  --lumesec-info: #1e40af;
}

.dark {
  --lumesec: #8654fb;
  --lumesec-foreground: #fafafa;
  --lumesec-soft: #a685ff;
  --lumesec-shine: #ffffff;
  --lumesec-glint: #ffffff;
  --lumesec-success: #00c758;
  --lumesec-warning: #eeb154;
  --lumesec-info: #4ab8e8;
}

@theme inline {
  --color-lumesec: var(--lumesec);
  --color-lumesec-foreground: var(--lumesec-foreground);
  /* … one entry per token */
}
TokenTailwind colourUsed forLightDark
--lumeseclumesecThe one accent moment#6219f3#8654fb
--lumesec-foregroundlumesec-foregroundText on the accent#fafafa#fafafa
--lumesec-softlumesec-softSecondary accent shades, traffic#a685ff#a685ff
--lumesec-shinelumesec-shineHighlights on dot fields#3f12b0#ffffff
--lumesec-glintlumesec-glintSparks on Interaction controls#c9bdff#ffffff
--lumesec-successlumesec-successSuccess#00a14b#00c758
--lumesec-warninglumesec-warningWarning#d97706#eeb154
--lumesec-infolumesec-infoInformation, upstream traffic#1e40af#4ab8e8

To use your own brand colour, change --lumesec in both blocks. Errors use your --destructive.

How each kind of component reads the theme

React components (Interaction, Pixel UI) are styled with Tailwind classes on these tokens, like any shadcn component: bg-card, text-muted-foreground, border-border, bg-lumesec. Edit the classes in the file to restyle one. Canvas layers resolve the same variables at runtime.

Custom elements (Pixel Lab, Pixel HD, Network, Service Map) draw inside a shadow root, so your stylesheet cannot reach into them. Custom properties inherit through the shadow boundary, so they read the same tokens from the page.

Both resolve any CSS colour format, including the oklch() values shadcn generates, color-mix() and var() chains. Canvas layers re-read their palette when the class, data-theme or style attribute of <html> changes, so a theme switch applies on the next frame.

Themes that store bare HSL channels (--border: 214 32% 91%, the format of older shadcn/ui versions) are not colours on their own. With such a theme, set the --ui-* overrides below to hsl(var(--border)) and so on.

Overrides for custom elements

Every custom element reads a private chain: an optional --ui-* override first, then your theme token, then a built-in fallback. Set an override to restyle LumeSec elements without touching the rest of your app.

OverrideFalls back toUsed for
--ui-page--backgroundPage behind a component
--ui-surface--cardCards and panels
--ui-raised--mutedHover fills, segmented tracks
--ui-track--mutedSlider and meter tracks
--ui-border--borderHairlines
--ui-border-strong--inputInputs, emphasised borders
--ui-fg--foregroundText and primary buttons
--ui-fg2a mix of --foreground and --muted-foregroundSecondary text
--ui-muted--muted-foregroundLabels and captions
--ui-fainta mix of --muted-foreground and --backgroundTicks and inactive dots
--ui-accent--lumesecThe accent
--ui-accent-soft--lumesec-softSecondary accent shades
--ui-on-accent--lumesec-foregroundText on the accent
--ui-shine--lumesec-shineHighlights on dot fields
--ui-ok / --ui-warn / --ui-info--lumesec-success / --lumesec-warning / --lumesec-infoSignal colours
--ui-danger--destructiveErrors
--ui-font / --ui-mono--font-sans / --font-monoText, and numbers, IDs, code

Overrides cascade like any custom property. To give one panel its own accent:

.billing {
  --ui-accent: #0f766e;
}

For a React component, pass a class instead: className="[--lumesec:#0f766e]" on the component (or a wrapper) recolours its accent.

Without a theme

With none of these variables on the page, every component falls back to the light and dark values above and follows the operating system's colour scheme.

Dark mode

Components follow whichever mechanism your theme uses, a .dark class, a data-theme attribute or prefers-color-scheme, because the tokens change, not the components.

Every component page lists the tokens it reads under Theming.

Was this page helpful?