B
Bonzai 2
Administration

Theming Guide

Customize the look and feel of your Bonzai 2 intranet.

Set Up Theming in 3 Steps

15-30 minutes
1

Add Theme Manager to your homepage

Edit your homepage, add the "Bonzai Theme Manager" web part to any section.

2

Configure colors and branding

Use the in-page color pickers to set Core colors (Primary, Background, Text, Accent), plus Mega Menu, Footer, and Slider branding.

3

Save and publish

Click "Save Theme" — writes to this browser and, when "Save for all users on this site" is on, to a hidden BonzaiTheme list so every page loads the same theme. Then publish the page.

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 in-page interface for configuring:

  • Core Colors — Primary, Background, Text, Accent
  • Mega Menu Branding — colors, logo, nav/dropdown spacing, breadcrumb, search bar, page layout fix
  • Footer Branding — colors, logo, section titles, column separators, feedback section
  • Slider Branding — overlay colors for the News / Highlights slider
  • Navigation Source — one URL lets multiple sites share Mega Menu and Footer lists
  • Style Options — dark mode, corner style (Sharp / Rounded / Pill)

Difference from Classic Bonzai

Classic Bonzai used Brick for theming with CDN propagation delays. Bonzai 2 uses CSS Custom Properties, applying changes immediately in the browser with no CDN wait time.

Full configuration reference

This page is the guide. For the complete list of every color picker, slider, toggle, default, and range, see the Theme Manager web part reference.

Theme Manager vs Brick

AspectClassic (Brick)Modern (Theme Manager)
AccessSeparate AWS Cognito loginOn-page, SharePoint permissions
Changes5-15 min CDN propagationInstant (CSS custom properties)
PreviewBrick preview sectionLive on actual page
Dark ModeNot supportedTheme-level setting (editor sets it as part of the theme)
PersistenceCDN-hosted CSS fileBrowser localStorage + optional BonzaiTheme list (site-wide)
User AccessRequires Brick credentialsAny page editor (Site Owner for first site-wide save)

When to Use This Web Part

Use this when you need to...

  • Setting your organization brand colors across all Bonzai web parts
  • Branding the Mega Menu header, logo, and hover states
  • Branding the Footer (colors, logo, section titles, feedback section)
  • Configuring the News / Highlights slider overlay colors
  • Pointing multiple sites at a shared Mega Menu / Footer list (Navigation Source)
  • Providing a dark or high-contrast theme as the default for the site

Best page locations

  • Homepage — place Theme Manager here so editors can review changes in context
  • Any single page — the theme applies site-wide regardless of where Theme Manager lives

Consider alternatives when...

  • Per-page theming — theme settings are global to the site (or tenant, via the BonzaiTheme list)
  • Native SharePoint chrome — command bar and native navigation use the SharePoint site theme, not these CSS custom properties

Complete Theming Setup

1

Navigate to the page that will host Theme Manager

The homepage is a common choice, but any page works — theme settings apply site-wide, not per page.
2

Edit the page

Click "Edit" in the top right to enter page edit mode.
3

Add the Theme Manager web part

Click the + button, search for "Bonzai Theme Manager", and add it to a section (bottom of page works well).

Leave the default property pane settings on: "Show only in edit mode" (hides the control from readers) and "Save theme for all users on this site" (persists to the BonzaiTheme list).

4

Pick a Quick Theme preset (optional starting point)

The presets are: Bonzai Default, Corporate Blue, Warm Earth, Cool Mint, Dark Mode, and High Contrast. Selecting one fills in all colors so you can tweak from there.
5

Set Core Colors

Use the four Core Color pickers — Primary (links, buttons, icons), Background (page and cards), Text (headings, body), and Accent (highlights, badges).
6

Configure Mega Menu Branding

Set the Mega Menu background, text, hover background, and hover text colors. Optionally set a logo PNG URL and tune navigation / dropdown spacing, breadcrumb visibility / alignment / inset, the typeahead search bar (scope + placeholder + quick results count), and the Page Layout Fix toggle for CMSPUBLISHING sub-sites.
7

Configure Footer Branding

Set Footer background/text, section title color, items color, feedback description color, and optional logo URL. Adjust logo size, section title font size (10–24 px), bold/italic/underline section titles, column separators, and the feedback section (show/hide, textarea height, or replace with a redirect button to an external form).
8

Configure Slider Branding (if you use the News / Highlights slider)

Set the overlay colors — Comment & Like Icon, Overlay Text, and Date Label — all default to white.
9

Set Navigation Source (multi-site deployments only)

If this site should fetch its Mega Menu / Footer lists from another site, paste that site's https URL into Navigation Source Site URL. Theme Manager will verify that MegaMenuNavigation and FooterNavigation exist there.

Leave empty to use the current site. The footer feedback form always submits to the current site — only the list reads are redirected.

10

Pick Style Options

Toggle Dark Mode (this is a theme setting, not a per-user toggle — it auto-inverts background/text if they look like the opposite mode) and choose a Corner Style: Sharp, Rounded, or Pill.
11

Review in the Live Preview

The Live Preview card inside Theme Manager shows a sample heading, paragraph, link, and two buttons — all using the same CSS custom properties the rest of the site uses. Changes apply the moment you pick them.
12

Save the theme

Click "Save Theme". It always writes to localStorage for your browser. With "Save theme for all users on this site" enabled, it also writes to a hidden BonzaiTheme list on the site so everyone sees the same theme on next page load.

The first site-wide save creates the BonzaiTheme list (with a ThemeJson column) and may require Site Owner permissions.

13

Publish the page

Save and publish the page that hosts Theme Manager. Other Bonzai web parts do not need to be on that page — they read the theme on load via the shared theme loader.

CSS Custom Properties

All Bonzai 2 web parts read from CSS custom properties set on :root. Theme Manager writes these whenever the editor changes a value, and the shared theme loader re-applies them on every page load. The four Core Colors you pick drive 16+ derived values (hover states, tints, borders) — you don't set those manually.

You rarely need to touch these directly

These names are useful if you are writing a custom web part or SPFx extension that should follow the site theme. For normal configuration use the Theme Manager UI — it derives all these values from your four Core Colors plus the branding sections.

Core (set by the four color pickers)

:root {
  /* Brand — derived from Primary */
  --bonzai-primary;
  --bonzai-primary-hover;
  --bonzai-primary-light;      /* 10% alpha of primary */

  /* Accent — derived from Accent */
  --bonzai-accent;
  --bonzai-accent-hover;
  --bonzai-accent-light;       /* 10% alpha of accent */

  /* Text — derived from Text */
  --bonzai-text-primary;
  --bonzai-text-secondary;
  --bonzai-text-tertiary;
  --bonzai-text-inverse;

  /* Background — derived from Background */
  --bonzai-bg-primary;
  --bonzai-bg-secondary;
  --bonzai-bg-tertiary;

  /* Border — derived based on light / dark mode */
  --bonzai-border-color;
  --bonzai-border-color-light;
  --bonzai-border-color-dark;

  /* Corner Style */
  --bonzai-border-radius-sm;   /* 0px sharp, 2px rounded, 8px  pill */
  --bonzai-border-radius-md;   /* 0px sharp, 4px rounded, 16px pill */
  --bonzai-border-radius-lg;   /* 0px sharp, 6px rounded, 24px pill */
}

Mega Menu Branding

:root {
  --bonzai-megamenu-bg;
  --bonzai-megamenu-bg-secondary;
  --bonzai-megamenu-bg-hover;
  --bonzai-megamenu-text;
  --bonzai-megamenu-text-secondary;
  --bonzai-megamenu-accent;
  --bonzai-megamenu-accent-hover;
  --bonzai-megamenu-accent-light;
  --bonzai-megamenu-hover-bg;
  --bonzai-megamenu-hover-text;
  --bonzai-megamenu-logo-url;               /* CSS url() or 'none' */
  --bonzai-megamenu-breadcrumb-display;     /* 'flex' or 'none' */
  --bonzai-megamenu-breadcrumb-justify;     /* flex-start | center | flex-end */
  --bonzai-megamenu-breadcrumb-offset;      /* 0%–40% */

  /* Navigation bar spacing (50–150% of base) */
  --bonzai-megamenu-nav-spacing-xs ... -xxl;

  /* Dropdown panel spacing (50–150% of base) */
  --bonzai-megamenu-dropdown-spacing-xs ... -xxl;
}

Footer Branding

:root {
  --bonzai-footer-bg;
  --bonzai-footer-bg-secondary;
  --bonzai-footer-text;
  --bonzai-footer-text-secondary;
  --bonzai-footer-link;
  --bonzai-footer-link-hover;
  --bonzai-footer-border;
  --bonzai-footer-logo-url;                 /* CSS url() or 'none' */
  --bonzai-footer-logo-width;               /* scales 50–200% */
  --bonzai-footer-logo-height;              /* scales 50–200% */
  --bonzai-footer-title-color;
  --bonzai-footer-title-font-weight;        /* 400 or 600 */
  --bonzai-footer-title-font-style;         /* normal or italic */
  --bonzai-footer-title-text-decoration;    /* none or underline */
  --bonzai-footer-title-font-size;          /* 10px–24px */
  --bonzai-footer-items-color;
  --bonzai-footer-separator-width;          /* 0px or 1px */
  --bonzai-footer-feedback-display;         /* 'block' or 'none' */
  --bonzai-footer-feedback-min-height;      /* 2–10 lines × 22px */
  --bonzai-footer-feedback-text-color;
}

Slider Branding

:root {
  --bonzai-slider-social-color;    /* comment & like icons (default #ffffff) */
  --bonzai-slider-overlay-text;    /* overlay titles, metadata, excerpts */
  --bonzai-slider-date-color;      /* date label */
}

Using these in custom SCSS

In src/shared/styles/_variables.scss these CSS custom properties are already wrapped in SCSS variables with safe fallbacks (for example $brand-primary: var(--bonzai-primary, #70a7af)). When writing a new web part, prefer the SCSS variables — they stay themeable and degrade gracefully if Theme Manager never ran.

Dark Mode

Dark Mode is a theme-level setting inside Theme Manager — it's not a per-user toggle that end users flip on each page. When the editor turns Dark Mode on and saves the theme, every user who loads a page after that sees the dark theme. When it's off, everyone sees the light theme.

  • Toggle is in Theme Manager under Style Options → Dark Mode.
  • When switched on, if Background/Text still look light-mode, Theme Manager auto-inverts them to #1f1f1f / #e5e5e5 as a sensible default. You can override either picker afterwards.
  • Secondary/tertiary text and background are re-derived from the new Background color so web parts stay readable.
  • The Dark Mode preset is just a shortcut that sets isDark = trueplus a pre-tuned dark palette — pick it, then tweak individual colors.

No automatic prefers-color-scheme detection

The current theme does not automatically follow the user's OS dark mode preference. Dark mode is enforced by the saved theme, not the browser. If you want your site to flip automatically with the OS, that would be a custom extension on top of the CSS custom properties above.

Persistence: localStorage + BonzaiTheme List

Theme Manager has two ways to remember a saved theme. Both run on the same Save Theme click; you don't choose — the property pane toggle decides.

  1. Browser localStorage (always on) — key bonzai-theme-v2. Persists the theme for this browser only. Ideal while you're iterating; useless for other users, other devices, or sessions where storage is blocked (guest / private).
  2. BonzaiTheme list (when persistToSite is on — the default) — a hidden list on the site with a single item and a ThemeJson column holding the serialized theme. The shared theme loader reads this on every page, so all users see the same theme. Theme Manager creates the list and column on the first save (this creation step typically requires Site Owner permissions).

Which site gets the list?

If Navigation Source Site URL is set, Theme Manager reads and writes the BonzaiTheme list on that source site. Otherwise it uses the current site. This means sub-sites pointing at a central root can share one theme without duplicating the list.

Property pane toggles

Theme Manager only has two property pane settings: showInEditMode (hide the editor from readers — recommended on) and persistToSite (write to the BonzaiTheme list on save — recommended on for a real deployment, off while experimenting).

Navigation Source (Multi-Site)

The Navigation Source Site URL field lets you keep a single set of Mega Menu and Footer lists on one site and have other sites read from it, instead of duplicating the lists on every sub-site.

  • Leave empty (default) — Mega Menu and Footer read from the current site.
  • Set to another https:// site URL — they read from that site instead.
  • When you tab out of the field, Theme Manager validates the URL and checks whetherMegaMenuNavigation and FooterNavigation exist there (showing item counts or a not-found warning).
  • The footer feedback form still submits to the FooterFeedback list on the current site — only the navigation list reads are redirected.
  • Changing this value also changes which site's BonzaiTheme list is read/written (see Persistence above), so it is effectively a "central theming + navigation site" pointer.

Full walkthrough

For the step-by-step multi-site setup (root site + each sub-site), see the Theme Manager web part reference.

Best Practices

Place Theme Manager on one page only

You only need Theme Manager on a single page (the homepage is a common choice). Theme values apply to all Bonzai web parts site-wide because the shared theme loader reads the BonzaiTheme list / localStorage on every page — not from Theme Manager itself.

Start with a preset

Start from one of the built-in presets — Bonzai Default, Corporate Blue, Warm Earth, Cool Mint, Dark Mode, or High Contrast — then fine-tune individual colors and branding.

Test accessibility contrast

Ensure text and background colors have at least a 4.5:1 contrast ratio for WCAG 2.1 AA. Test Core Colors, Mega Menu, and Footer branding combinations — they are independent, so the footer can fail contrast even when the page body passes.

Hide from readers, persist site-wide

Keep showInEditMode on so only page editors see Theme Manager, and keep persistToSite on so the theme actually reaches other users via the BonzaiTheme list.

Logo URL requirements

Mega Menu and Footer logo URLs must be absolute http(s) URLs ending in .png (Theme Manager validates on blur). Recommended sizes: 160×48 / 48×32 for Mega Menu, 140×40 for Footer. Keep files transparent and under ~200 KB so they don't slow the first paint on every page.

Troubleshooting

Still need help? Contact Bonzai Support

Related Resources