Theme System
Set your brand once onSpiceFlowProvider. Every SDK component inherits it automatically.
SpiceTheme Options
| Option | Type | Default | Description |
|---|---|---|---|
primaryColor | string | "#EA4B4B" | Accent color — buttons, highlights, active states |
dark | boolean | false | Dark or light mode |
shell | string | Mode default | Modal outer background |
card | string | Mode default | Card and input area background |
text | string | Mode default | Primary text color |
textMuted | string | Mode default | Secondary/label text color |
border | string | Mode default | Border color |
borderRadius | string | "8px" | Border radius applied across all components |
fontFamily | string | "Helvetica Neue" | Primary font family |
appName | string | "Spicenet" | App name shown in modal headers |
logo | ReactNode | Custom logo for modal headers |
shell, card, text, textMuted, border) have sensible defaults per mode — only set what you want to override.
Dark Mode
Default Surface Colors
| Token | Dark | Light |
|---|---|---|
shell | #141414 | #ffffff |
card | #1e1e1e | #f9fafb |
text | #ffffff | #111827 |
textMuted | #888888 | #6b7280 |
border | {primaryColor}33 | {primaryColor}22 |
Custom Surfaces
Override any surface token alongside the mode:Per-Component Override
Passstyles to any component to override the provider theme for that instance only:
Available styles keys per component
| Component | Keys |
|---|---|
SpiceDeposit | primaryColor, button.backgroundColor, button.color, button.borderRadius, inputVariant, fontFamily |
SpiceWithdraw | primaryColor, button.backgroundColor, button.color, fontFamily |
SpiceSupply | primaryColor, button.backgroundColor, button.color, inputVariant |
SpiceLockModal | primaryColor, button.backgroundColor, button.color, fontFamily |
LpModal | primaryColor, fontFamily |
AccountDisplay | primaryColor, fontFamily |
SpiceBalance | primaryColor, fontFamily |
inputVariant accepts "light" or "dark" to override the input field style independently of the global mode.
Fonts
The SDK uses two fonts:- Helvetica Neue — all body text, labels, headings, descriptions
- IBM Plex Mono — amounts, addresses, hashes, button labels
theme.fontFamily. The monospace font is always used for technical displays.
Examples
Orange Dark
Blue Light
Green Dark with Custom Surfaces
Sharp Trading UI
Building Custom Components
UseuseSpiceBrand to match the SDK theme inside your own components:
palette is the fully-resolved palette for the current mode — dark or light values depending on dark. It exposes: shell, cardBg, inputBg, hoverBg, textPrimary, textSecondary, inputText, inputPlaceholder, cardBorder, inputBorder, buttonBorder, and semantic tokens (successBg, errorBg, warningBg, infoBg, and their border/text variants).
dk is the raw dark palette, useful when you need dark-specific values regardless of mode (e.g. for overlay rendering).
Next Steps
Components
See all available components
Configuration
Configure providers and chains
Examples
See styled examples in action
Best Practices
Follow integration best practices
