Skip to main content
In this guide you’ll create a custom theme for Backstage and wire it into your frontend app so the UI uses your colors, fonts, and other theme settings. This lets you provide consistent branding across the catalog, docs, and plugins.
Theme configuration objects and helpers live in the @backstage/theme package. For the Prep Course - Certified Backstage Associate (CBA), remember @backstage/theme as the package that contains the theming helpers.

What you’ll do (high level)

Where to put the theme file

In a standard Backstage monorepo, theme files belong in the frontend app package. A typical location:
  • packages/app/src/theme/myTheme.ts
This keeps frontend-only configuration with other UI code and ensures theme compilation with your app bundle.

Create packages/app/src/theme/myTheme.ts

This file defines and exports theme objects using the Backstage theme helpers. Use createBaseThemeOptions to obtain a compatible base and createUnifiedTheme to produce a theme object consumable by UnifiedThemeProvider. Example myTheme.ts:
Notes about the example:
  • palettes.light provides a solid base palette; you can override specific colors like primary and secondary.
  • navigation contains Backstage-specific navigation colors and hover states.
  • You can add typography, spacing, and other overrides as needed.

Register the theme with your application

Open the app entry where createApp is called (commonly packages/app/src/App.tsx) and add theme entries to the themes array. Each theme entry needs:
  • id — unique identifier
  • title — shown in theme picker
  • variant — e.g., 'light' or 'dark'
  • icon — a JSX icon to display
  • Provider — component that wraps the app with UnifiedThemeProvider and supplies the theme object
Example App.tsx changes:
Why this works:
  • The Provider value replaces the default theme provider created by the app when the user chooses that theme.
  • UnifiedThemeProvider makes the theme object available via React context so all Backstage UI components can consume it.

How it works (APIs at a glance)

Quick visual

After switching to a theme like funTheme, the UI reflects your palette and font choices across the catalog, navigation, and pages (primary/secondary colors, navigation highlights, and typography).
A web UI screenshot of "My Company Catalog" showing a table of components (app1, app2, auth-service, example-website, recommendation-service, shopping-cart) with columns for owner, type, lifecycle, description and action icons. The left sidebar shows navigation (Home, APIs, Docs) and a filter panel for kind, type and ownership.

Additional tips

  • Provide multiple theme variants (light/dark) and let users switch between them in the UI.
  • You can tweak many theme properties: typography, spacing, shadows, and fine-grained color values for specific Backstage components.
  • During development, the Backstage dev server typically picks up frontend changes without restarting — but sometimes a rebuild or refresh may be required.
  • For more details on theming primitives, see the @backstage/theme package documentation and the Backstage frontend docs:
Summary: create your theme file under the frontend app, export theme objects using createBaseThemeOptions + createUnifiedTheme, and register them in createApp(...) with a Provider that wraps children with UnifiedThemeProvider.

Watch Video