Theme Configuration
Customize the look and feel of your documentation site with theme settings.
Colors
Primary Color
Set your brand's primary color:
theme:
colors:
primary: "#6366f1"
The primary color is used for:
- Links
- Active navigation items
- Buttons
- Accent elements
Additional Colors
theme:
colors:
primary: "#6366f1"
secondary: "#ec4899"
accent: "#f59e0b"
Background and Text Colors
Customize background and text colors for light and dark modes:
theme:
colors:
background:
light: "#ffffff"
dark: "#0f172a"
text:
light: "#1e293b"
dark: "#e2e8f0"
Dark Mode
Enable/Disable
Dark mode is enabled by default. To disable:
theme:
darkMode:
enabled: false
Default Mode
Set the default theme mode:
theme:
darkMode:
enabled: true
default: system # Options: 'system', 'light', 'dark'
| Value | Behavior |
|---|---|
system |
Follow user's OS preference (default) |
light |
Start in light mode |
dark |
Start in dark mode |
Users can still toggle the theme unless you hide the toggle:
header:
showThemeToggle: false
Fonts
Sans-Serif and Monospace
theme:
fonts:
sans: Inter
mono: JetBrains Mono
Default fonts:
- Sans-serif: Inter
- Monospace: JetBrains Mono
Google Fonts
Stardust automatically loads fonts from Google Fonts. Any Google Font name works:
theme:
fonts:
sans: "Roboto"
mono: "Fira Code"
System Fonts
Use system font stacks for faster loading:
theme:
fonts:
sans: "system-ui, -apple-system, sans-serif"
mono: "ui-monospace, monospace"
Border Radius
Control the roundness of UI elements:
theme:
radius: "8px" # Default
| Value | Appearance |
|---|---|
0 |
Sharp corners |
4px |
Slightly rounded |
8px |
Moderately rounded (default) |
12px |
More rounded |
9999px |
Fully rounded (pill shape) |
Custom CSS
Add custom styles to your site:
theme:
custom:
css: |
:root {
--custom-variable: #ff0000;
}
.sidebar {
border-right: 1px solid var(--border-color);
}
CSS Variables
Stardust exposes CSS variables you can override:
:root {
/* Colors */
--color-primary: #6366f1;
--color-background: #ffffff;
--color-text: #1e293b;
--border-color: #e2e8f0;
/* Fonts */
--font-sans: 'Inter', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
/* Spacing */
--radius: 8px;
}
Code Themes
Configure syntax highlighting themes:
code:
theme:
light: github-light
dark: github-dark
Available themes include:
github-light,github-darkdraculanordone-dark-promaterial-thememonokai- And many more...
See Code Configuration for more code-related settings.
Logo
Single Logo
logo: /images/logo.svg
Separate Light/Dark Logos
logo:
light: /images/logo-light.svg
dark: /images/logo-dark.svg
💡 Tip
Use SVG logos for best quality at all sizes. Place logo files in the public/ directory.
Complete Theme Example
theme:
colors:
primary: "#3b82f6"
secondary: "#8b5cf6"
background:
light: "#fafafa"
dark: "#0a0a0a"
text:
light: "#171717"
dark: "#fafafa"
darkMode:
enabled: true
default: system
fonts:
sans: "Inter"
mono: "Fira Code"
radius: "8px"
custom:
css: |
/* Add a gradient to the header */
.header {
background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}
code:
theme:
light: github-light
dark: one-dark-pro
lineNumbers: false
copyButton: true