Skip to main content

Customize the theme

This guide explains how to match the Casdoor pages to your brand by setting the style, the primary color, the border radius, and the compact mode.


Learning outcomes​

  • Understand the three levels of themes.
  • Set the theme of an organization.
  • Set the theme of a single application.

What you need​

  • Administrator access to the Casdoor admin console

Theme levels​

LevelWhere you set itWhere it applies
GlobalIn the source code only, in web/src/Conf.tsEvery organization that has no theme of its own
OrganizationEdit page of the organizationAll pages of the admin console for members of the organization, and the entry pages (sign-in, sign-up, forgot password, and so on) of the applications that follow the organization theme
ApplicationEdit page of the applicationThe entry pages of that application only

Theme settings​

SettingDescription
ThemeThe style of the pages. Default follows the light or dark mode that the visitor chooses. Dark always shows the dark mode and sets the border radius to 2. Document sets the primary color to green and the border radius to 4. Blossom sets the primary color to pink and the border radius to 16. You can change the primary color and the border radius after you pick a style
Primary colorThe color of buttons, links, and other highlighted elements. Pick a preset or enter any color
Border radiusThe roundness of corners, in pixels
Is compactShows the pages with smaller text and tighter spacing

Set the theme of an organization​

  1. In the Casdoor admin console, open the edit page of the organization.
  2. On the Advanced tab, in Customize theme, turn off Follow global theme, and set the theme settings.
  3. Save the organization.

Recording of editing the theme of an organization

If you edit the organization that you are signed in to, the change applies at once. Otherwise, sign in to that organization to see the theme.

Set the theme of an application​

  1. Open the edit page of the application.

  2. Turn off Follow organization theme, and set the theme settings in the theme editor.

  3. Check the result in the preview panel of the application.

    Theme preview on the application edit page

  4. Save the application.

See also​