Skip to main content

Reference · CSS variables

Canonical list of --nrn-* variables exposed by the widget inside the Shadow DOM. Source of truth: the CSS bundle embedded in https://cdn.neuroon.ai/widget@0.9.10/widget.js (the values here match that version). To verify a specific value, inspect the shadow root with DevTools and look at the .neuroon-widget block.

Conventions

  • Colors use the RGB-triplet format (6 182 212, not #06b6d4). The widget composes them with rgb(var(--nrn-primary)) and supports runtime alpha: rgb(var(--nrn-primary) / 0.18).
  • Spacings, radii, shadows, motion are standard CSS values (rem, ms, cubic-bezier(...)).
  • Z-index values are integers.
  • Variables are injected on .neuroon-widget (the shadow host). To override from outside, anchor the rule to the host: .neuroon-widget { --nrn-primary: 16 206 199; }.

Surfaces

VariableLight default
--nrn-surface-base255 255 255 (white)
--nrn-surface-elevated248 250 252 (slate-50)
--nrn-surface-overlay241 245 249 (slate-100)
--nrn-surface-hover226 232 240 (slate-200)
--nrn-surface-subtle241 245 249 (slate-100)
--nrn-surface-sunken241 245 249 (slate-100)
--nrn-surface-float250 251 252 (floating elements)

Text

VariableLight default
--nrn-text-primary15 23 42 (slate-900)
--nrn-text-secondary30 41 59 (slate-800)
--nrn-text-tertiary51 65 85 (slate-700)
--nrn-text-muted71 85 105 (slate-600 — WCAG AA)
--nrn-text-disabled148 163 184 (slate-400)

Border

VariableLight default
--nrn-border-default226 232 240 (slate-200)
--nrn-border-emphasis203 213 225 (slate-300)
--nrn-border-subtle241 245 249 (slate-100)

Brand primary

VariableDefaultComment
--nrn-primary8 145 178cyan-600 (4.5:1 on white)
--nrn-primary-light6 182 212cyan-500
--nrn-primary-dark14 116 144cyan-700
--nrn-primary-hover6 182 212cyan-500 (hover state)
--nrn-primary-text255 255 255text on primary

Full scale (for backgrounds, hover, borders):

VariableDefaultTypical use
--nrn-primary-50236 254 255subtle backgrounds
--nrn-primary-100207 250 254hover backgrounds
--nrn-primary-200165 243 252active backgrounds
--nrn-primary-300103 232 249light borders
--nrn-primary-40034 211 238decorative
--nrn-primary-5006 182 212= primary-light
--nrn-primary-6008 145 178= primary
--nrn-primary-70014 116 144= primary-dark
--nrn-primary-80021 94 117heavy accents
--nrn-primary-90022 78 99very dark
--nrn-primary-9508 51 68near black

Brand secondary

VariableDefault
--nrn-secondary37 99 235 (blue-600)
--nrn-secondary-light59 130 246 (blue-500)
--nrn-secondary-dark29 78 216 (blue-700)

Accent

VariableDefaultUse
--nrn-accent-purple147 51 234 (purple-600)AI suggestions, image search
--nrn-accent-emerald4 120 87 (emerald-700, WCAG AA)AI-applied filters, success
--nrn-accent-amber217 119 6 (amber-600)warnings, medium confidence
--nrn-accent-purple-strong109 40 217 (violet-700)purple emphasis
--nrn-accent-emerald-strong6 95 70 (emerald-800)emerald emphasis
--nrn-accent-amber-strong180 83 9 (amber-700)amber emphasis

Semantic

VariableDefault
--nrn-success22 163 74 (green-600)
--nrn-success-strong21 128 61 (green-700)
--nrn-warning202 138 4 (yellow-600)
--nrn-warning-strong161 98 7 (yellow-700)
--nrn-error220 38 38 (red-600)
--nrn-error-strong185 28 28 (red-700)
--nrn-info37 99 235 (blue-600)

Decorative & status

VariableDefaultUse
--nrn-rating245 158 11 (amber-500)stars/ratings
--nrn-rating-light251 191 36 (amber-400)rating background
--nrn-trending236 72 153 (pink-500)trending badges
--nrn-premium139 92 246 (violet-500)premium badges
--nrn-winner245 158 11 (amber-500)comparator winner
--nrn-importance-essential244 63 94 (rose-500)essential importance
--nrn-importance-high245 158 11 (amber-500)high importance
--nrn-importance-medium6 182 212 (cyan-500)medium importance
--nrn-importance-low100 116 139 (slate-500)low importance

Glass / overlay

VariableDefault
--nrn-overlay0 0 0
--nrn-overlay-opacity0.5
--nrn-glass-background255 255 255
--nrn-glass-border226 232 240
--nrn-ring-offset255 255 255
--nrn-glass-blur20px
--nrn-glass-blur-lg32px
--nrn-glass-bgrgba(255, 255, 255, 0.65)
--nrn-glass-bg-hoverrgba(255, 255, 255, 0.85)

Typography

VariableDefault
--nrn-font-size-xs0.75rem
--nrn-font-size-sm0.875rem
--nrn-font-size-base1rem
--nrn-font-size-lg1.125rem
--nrn-font-size-xl1.25rem
--nrn-font-weight-normal400
--nrn-font-weight-medium500
--nrn-font-weight-semibold600
--nrn-font-weight-bold700
--nrn-font-weight-display800
--nrn-font-letter-spacing-tight-0.02em
--nrn-font-letter-spacing-display-0.03em

Spacing

VariableDefault
--nrn-spacing-xs0.25rem
--nrn-spacing-sm0.5rem
--nrn-spacing-md0.75rem
--nrn-spacing-lg1rem
--nrn-spacing-xl1.5rem

Radius

VariableDefault
--nrn-radius-sm0.25rem
--nrn-radius-md0.375rem
--nrn-radius-lg0.5rem
--nrn-radius-xl0.75rem
--nrn-radius-2xl1rem

Shadow

VariableDefault
--nrn-shadow-xs0 1px 2px rgb(0 0 0 / 0.05)
--nrn-shadow-sm0 1px 3px rgb(0 0 0 / 0.1), 0 1px 2px rgb(0 0 0 / 0.06)
--nrn-shadow-md0 4px 6px rgb(0 0 0 / 0.07), 0 2px 4px rgb(0 0 0 / 0.06)
--nrn-shadow-lg0 10px 15px rgb(0 0 0 / 0.1), 0 4px 6px rgb(0 0 0 / 0.05)
--nrn-shadow-xl0 20px 25px rgb(0 0 0 / 0.1), 0 10px 10px rgb(0 0 0 / 0.04)
--nrn-shadow-2xl0 25px 50px rgb(0 0 0 / 0.25)
--nrn-shadow-primary0 4px 14px rgb(8 145 178 / 0.25)
--nrn-shadow-primary-lg0 8px 24px rgb(8 145 178 / 0.35)

Motion (duration + easing)

VariableDefaultUse
--nrn-duration-instant50mstap feedback
--nrn-duration-fast150mshover states
--nrn-duration-normal250msstandard transitions
--nrn-duration-slow400msmodal entrance
--nrn-duration-slower600msheavier entrances
--nrn-ease-outcubic-bezier(0.16, 1, 0.3, 1)smooth entrance
--nrn-ease-incubic-bezier(0.4, 0, 1, 1)quick exit
--nrn-ease-in-outcubic-bezier(0.65, 0, 0.35, 1)balanced
--nrn-ease-springcubic-bezier(0.34, 1.56, 0.64, 1)subtle bounce
--nrn-ease-bouncecubic-bezier(0.68, -0.6, 0.32, 1.6)playful bounce
--nrn-motion-entrance300ms var(--nrn-ease-out)entrance preset
--nrn-motion-exit200ms var(--nrn-ease-in)exit preset
--nrn-motion-hover150ms var(--nrn-ease-out)hover preset
--nrn-motion-stagger40msdelay between items

Z-index

VariableDefault
--nrn-z-dropdown1000
--nrn-z-sticky1020
--nrn-z-fixed1030
--nrn-z-drawer1040
--nrn-z-modal1050
--nrn-z-popover1060
--nrn-z-tooltip1070
--nrn-z-toast1080
--nrn-z-modal-fullscreen9999

Override from your host

Override directly using the RGB-triplet syntax:

.neuroon-widget {
--nrn-primary: 16 206 199; /* your brand color */
--nrn-primary-hover: 13 165 159;
--nrn-radius-md: 0.5rem;
}

Don't use #06b6d4 or rgb(6, 182, 212) — the widget wraps the variable in rgb(var(--nrn-primary) / <alpha>) and needs the function-less form. If your design system only exposes hex, convert to triplet before injecting.

Dark mode

The widget detects the theme via data-theme="dark" (manual) or prefers-color-scheme (auto, when theme="auto"). The variables above are the light-mode defaults. To see dark-mode defaults, inspect the shadow root with DevTools and look at the .neuroon-widget[data-theme="dark"] block. The most portable way to adapt your brand to both modes is to define both at the host:

.neuroon-widget { --nrn-primary: 16 206 199; }
.neuroon-widget[data-theme="dark"] { --nrn-primary: 102 240 234; }

Further reading