Entangle UI ships with a dark-first theme designed for professional editor interfaces. Every visual value — colors, spacing, typography, shadows — is defined as a theme token and exposed as a CSS custom property prefixed with --etui-.
Architecture Overview
The theme system is built on CSS custom properties:
CSS Custom Properties (--etui-*)
Applied at :root by default
┌───────────────────────────────────┐
│ contract.css.ts (property names) │
│ darkTheme.css.ts (values) │
└──────────────┬────────────────────┘
│
┌────────────────────┼────────────────────┐
│ │
Vanilla Extract CSS Override
(compile-time) (any selector)
import { vars } --etui-*: value
Vanilla Extract — tokens compile to CSS custom properties at build time. Zero runtime cost. Access via vars object.
CSS Override — any --etui-* custom property can be overridden with plain CSS on any selector.
Default Theme
The dark theme is applied globally on :root at build time. No provider is needed for the default look:
import { Button } from'entangle-ui';
// Works out of the box — dark theme is already active
<Buttonvariant="filled">Save</Button>;
Token Reference
Colors
Background
Token
CSS Property
Value
colors.background.primary
--etui-color-bg-primary
#1a1a1a
colors.background.secondary
--etui-color-bg-secondary
#2d2d2d
colors.background.tertiary
--etui-color-bg-tertiary
#3a3a3a
colors.background.elevated
--etui-color-bg-elevated
#404040
Surface (Interactive Elements)
Token
CSS Property
Value
colors.surface.default
--etui-color-surface-default
#2d2d2d
colors.surface.hover
--etui-color-surface-hover
#363636
colors.surface.active
--etui-color-surface-active
#404040
colors.surface.disabled
--etui-color-surface-disabled
#1f1f1f
colors.surface.whiteOverlay
--etui-color-surface-whiteOverlay
rgba(255,255,255,0.1)
Border
Token
CSS Property
Value
colors.border.default
--etui-color-border-default
#4a4a4a
colors.border.focus
--etui-color-border-focus
#007acc
colors.border.error
--etui-color-border-error
#f44336
colors.border.success
--etui-color-border-success
#4caf50
Text
Token
CSS Property
Value
colors.text.primary
--etui-color-text-primary
#ffffff
colors.text.secondary
--etui-color-text-secondary
#cccccc
colors.text.muted
--etui-color-text-muted
#888888
colors.text.disabled
--etui-color-text-disabled
#555555
Accent
Token
CSS Property
Value
colors.accent.primary
--etui-color-accent-primary
#007acc
colors.accent.secondary
--etui-color-accent-secondary
#005a9e
colors.accent.success
--etui-color-accent-success
#4caf50
colors.accent.warning
--etui-color-accent-warning
#ff9800
colors.accent.error
--etui-color-accent-error
#f44336
Spacing
All spacing values in pixels. md (8px) is the base unit.
Token
CSS Property
Value
xs
--etui-spacing-xs
2px
sm
--etui-spacing-sm
4px
md
--etui-spacing-md
8px
lg
--etui-spacing-lg
12px
xl
--etui-spacing-xl
16px
xxl
--etui-spacing-xxl
24px
xxxl
--etui-spacing-xxxl
32px
Typography
Font Sizes
Token
CSS Property
Value
xxs
--etui-font-size-xxs
9px
xs
--etui-font-size-xs
10px
sm
--etui-font-size-sm
11px
md
--etui-font-size-md
12px
lg
--etui-font-size-lg
14px
xl
--etui-font-size-xl
16px
Font Weights
Token
CSS Property
Value
normal
--etui-font-weight-normal
400
medium
--etui-font-weight-medium
500
semibold
--etui-font-weight-semibold
600
Line Heights
Token
CSS Property
Value
tight
--etui-line-height-tight
1.2
normal
--etui-line-height-normal
1.4
relaxed
--etui-line-height-relaxed
1.6
Font Families
Token
CSS Property
Value
mono
--etui-font-family-mono
SF Mono, Monaco, Consolas, “Liberation Mono”, monospace