Theming Guide
Customize the look and feel of your Bonzai 2 intranet.
Set Up Theming in 3 Steps
Add Theme Manager to your homepage
Edit your homepage, add the "Bonzai Theme Manager" web part to any section.
Configure brand colors
Use the interactive color pickers within the Theme Manager UI (in edit mode) to set primary, background, text, and accent colors.
Test and publish
Preview your changes, toggle dark mode if desired, then save and publish.
Overview
Bonzai 2 uses CSS Custom Properties (CSS Variables) for theming, enabling instant color changes without waiting for CDN propagation. The Theme Manager web part provides an intuitive interface for customization.
Difference from Classic Bonzai
Theme Manager vs Brick
| Aspect | Classic (Brick) | Modern (Theme Manager) |
|---|---|---|
| Access | Separate AWS Cognito login | On-page, SharePoint permissions |
| Changes | 5-15 min CDN propagation | Instant |
| Preview | Brick preview section | Live on actual page |
| Dark Mode | Not supported | Built-in toggle |
| User Access | Requires Brick credentials | Any page editor |
Complete Theming Setup
Navigate to your homepage
Edit the page
Add the Theme Manager web part
Enable "Show in Edit Mode Only" to hide it from regular users.
Set your primary color
Set secondary and accent colors
Configure background and text colors
Enable dark mode (recommended)
Select a preset (optional)
Test and publish
CSS Custom Properties
All Bonzai 2 web parts use these CSS variables for consistent theming:
:root {
/* Primary brand color */
--bonzai-primary: #0f766e;
/* Secondary accent color */
--bonzai-secondary: #14b8a6;
/* Accent/highlight color */
--bonzai-accent: #2dd4bf;
/* Background colors */
--bonzai-bg: #ffffff;
--bonzai-bg-secondary: #f9fafb;
/* Text colors */
--bonzai-text: #1f2937;
--bonzai-text-secondary: #6b7280;
/* Border colors */
--bonzai-border: #e5e7eb;
}
/* Dark mode overrides */
.dark {
--bonzai-primary: #2dd4bf;
--bonzai-secondary: #14b8a6;
--bonzai-bg: #0f172a;
--bonzai-bg-secondary: #1e293b;
--bonzai-text: #f9fafb;
--bonzai-text-secondary: #9ca3af;
--bonzai-border: #374151;
}Dark Mode
Bonzai 2 includes built-in dark mode support. When enabled via Theme Manager:
- Users see a dark mode toggle on the page
- Preference is stored in browser local storage
- System preference is respected by default
- All Bonzai web parts automatically adapt
Respect user preferences
Best Practices
Place Theme Manager on homepage only
Start with preset themes
Test accessibility contrast
Hide from regular users
Related Resources
- Theme Manager Web Part — Detailed configuration reference
- Home Page Recipe — Setting up Theme Manager on your homepage
- Classic vs Modern — Migration considerations for theming