CSS Custom Properties Default
Theming Guide
Secure-UI uses CSS custom properties as design tokens. Override them globally, per component, or per instance — no build step, no configuration files.
5 Built-in Themes
∞ Custom Combinations
0 Build Steps
Default
Dark
Ocean
Forest
Enterprise
Preset Themes
Click a preset to preview it live. Copy the CSS override block into your stylesheet to apply it.
Default
Light background, emerald accent
Dark
Near-black background, indigo accent
Ocean
Sky-blue tones, light cool palette
Forest
Soft green background, forest tones
Enterprise
Corporate blue, clean neutral base
Live Preview Default
Token Reference
Site-level tokens control the overall palette. Component tokens (--secure-ui-*) inherit from them automatically.
| Token | Default | Description |
|---|---|---|
--accent-primary | #10b981 | Primary brand / action colour |
--accent-secondary | #059669 | Hover / darker accent variant |
--accent-glow | rgba(16,185,129,0.15) | Focus rings and glow effects |
--bg-primary | #ffffff | Main page background |
--bg-secondary | #f8f9fa | Cards, panels, alternate rows |
--bg-elevated | #ffffff | Dropdowns, tooltips, modals |
--text-primary | #1a1a2e | Headings and body copy |
--text-secondary | #4a5568 | Labels, captions, helper text |
--border-subtle | #e2e8f0 | Card borders, dividers |
--border-medium | #cbd5e1 | Hover border state |
Applying a Theme
Override tokens at any scope: the full page, a single component, or a single element.
Global override css
/* Apply a dark theme globally */
:root {
--accent-primary: #6366f1;
--accent-secondary: #4f46e5;
--accent-glow: rgba(99, 102, 241, 0.2);
--bg-primary: #0a0a0f;
--bg-secondary: #121218;
--bg-elevated: #1c1c28;
--text-primary: #f0f4ff;
--text-secondary: #94a3b8;
--border-subtle: rgba(255,255,255,0.08);
}Scoped override css
/* Override just one component instance */
.payment-section secure-input {
--secure-ui-input-border-color: #ef4444;
--secure-ui-input-border-color-focus: #dc2626;
}
/* Or target the host element directly */
secure-form.checkout-form {
--secure-ui-form-gap: 1.5rem;
}Dark mode (automatic) css
/* Responds to OS preference automatically */
@media (prefers-color-scheme: dark) {
:root {
--bg-primary: #0a0a0f;
--bg-secondary: #121218;
--text-primary: #f0f4ff;
--text-secondary: #94a3b8;
--border-subtle: rgba(255,255,255,0.08);
}
}Component token override css
/* Target secure-ui component tokens directly.
These live inside the Shadow DOM but are
inherited from the outer scope via CSS
custom property inheritance. */
:root {
--secure-ui-input-border-radius: 0.75rem;
--secure-ui-input-height: 3rem;
--secure-ui-form-gap: 1.5rem;
--secure-ui-color-primary: #6366f1;
}