Skip to content

Theming

All components use scoped <style> blocks with CSS custom properties. Override the variables on a parent wrapper or :root to theme every component at once.

VariablePurposeDark default
--dx-bgPage background#0d0d0d
--dx-textPrimary text#e8e8e8
--dx-mutedSecondary text#888
--dx-accentError/accent color#c00
--dx-surfaceCard/panel background#161616
--dx-borderBorder color#2a2a2a
--dx-fontFont family"Geist Mono", monospace

Copy any of these blocks into your global CSS. Each component page has a live preset switcher to preview them.

.dx-error, .dx-error-page, .dx-not-found, .dx-pending {
--dx-bg: #0d0d0d;
--dx-text: #e8e8e8;
--dx-muted: #888;
--dx-accent: #c00;
--dx-surface: #161616;
--dx-border: #2a2a2a;
--dx-font: "Geist Mono", monospace;
}
.dx-error, .dx-error-page, .dx-not-found, .dx-pending {
--dx-bg: #fff;
--dx-text: #111;
--dx-muted: #666;
--dx-accent: #d00;
--dx-surface: #f5f5f5;
--dx-border: #ddd;
--dx-font: system-ui, -apple-system, sans-serif;
}
.dx-error, .dx-error-page, .dx-not-found, .dx-pending {
--dx-bg: transparent;
--dx-text: currentColor;
--dx-muted: #999;
--dx-accent: #e00;
--dx-surface: transparent;
--dx-border: transparent;
--dx-font: inherit;
}
.dx-error, .dx-error-page, .dx-not-found, .dx-pending {
--dx-bg: inherit;
--dx-text: inherit;
--dx-muted: inherit;
--dx-accent: inherit;
--dx-surface: inherit;
--dx-border: inherit;
--dx-font: inherit;
}

Components auto-detect prefers-color-scheme: light in their defaults. Override the variables to force a single mode.