Crema React
v-2
v-2
  • About Crema(CRA)
  • Product Overview
  • Folder Structure
  • Installation
    • Pre-Requisites
    • Installing Crema
  • Default Route
  • Customization
    • Template Style
    • Template Mode
    • Template and Sidebar Color
    • Tempate Direction
    • Navigation Style
    • Footer
    • Footer Type
    • Route Transition
  • Multi-Lingual Support
    • Changing Language
    • Adding New Language
  • Sidebar Menu
    • Adding New Menu
  • Route Protection
  • Loggedin User
  • Axios Setup
  • Package.json
  • GitHub Access
  • Slack Community
  • FAQ
  • Next.js
    • About Next.JS
    • Installation
    • Folder Structure
    • Route Protection
    • Deploy to server
  • Servers
    • Python
    • Mongoose
    • Laravel
Powered by GitBook
On this page

Was this helpful?

  1. Customization

Template Mode

Last updated 5 years ago

Was this helpful?

Three template modes are available in the Crema i.e. Light, Semi-Dark and Dark. You can choose any one of the three according to your choice. Switching between the Modes is very easy.

Changing Template Mode in run time:-

Click on the Settings button on the right corner of the screen just below the notification icon, a drawer will open in which you will find Template Mode Option and from there, you can choose between Light, Semi-Dark and Dark Mode.

Changing Template Mode in development mode (setting default Mode) :-

To set the default Template Mode, go to the following file:-

src/@crema/utility/ContextProvider/defaultConfig.js

In this file, you will find a property named 'themeMode'. You need to set the value of 'themeMode' according to your choice from the accepted values. You can find the accepted values of 'themeMode' in the file with the path:-

src/shared/constants/AppEnums.js

For Setting Dark mode, you need to follow one more step :-

In the 'defaultConfig.js' file, there is a object type property named "pallete" which contains some template related properties. In the pallete object, there is a property named 'type', you need to set the value of type to 'ThemeMode.DARK'. After that, you need to set the background color and text color present in the 'pallete' property according to your choice. In case, you don't want to set the color, simply remove the 'background' and 'text' property, then the template will take the background and text color according to Material UI default colors.

Look at the image for reference:-