Buy nowGet update
  • getting started
    • Introduction
    • Quick start
    • Mock server
    • Deployment
    • Package & license
    • Setup
    • Figma
  • theme UI
    • Colors
    • Typography
    • IconsNEW
    • Shadows
    • Css vars
    • Logo
    • Layout
    • Navigation
    • Settings
  • Global
    • Styles
    • Config
    • Components overrides
  • development
    • Routing
    • Subfolder
    • Authentication
    • Environment variables
    • Api calls
    • Multi language
    • Structure
    • Clean project
    • Dependencies
    • Tailwind
    • Migrate to CRA
    • Credit assets
  • support
    • 🔵 Update
    • 🔴 Faqs & support
    • 🟣 Changelogv7.4.0
© All rights reserved.ContactHome

Settings

Latestv7v6.1.0v5

This section will describe how you settings your theme.


Change default settings

Remove local storage or cookies when you change settings.

<SettingsProvider
  defaultSettings={{
    colorScheme: 'light',
    direction: 'ltr',
    contrast: 'default',
    navLayout: 'vertical',
    primaryColor: 'default',
    navColor: 'integrate',
    compactLayout: true,
    fontFamily: defaultFont,
  }}
/>
src/App.js, src/app/layout.js

Base theme

Without settings and locales.

export function createTheme() {
  const initialTheme = {
    colorSchemes,
    shadows: shadows('light'),
    customShadows: customShadows('light'),
    shape: { borderRadius: 8 },
    components,
    typography,
    cssVarPrefix: '',
    shouldSkipGeneratingVar,
  };
 
  const theme = extendTheme(initialTheme, overridesTheme);
 
  return theme;
}
src/theme/create-theme.ts

With localization
export function createTheme(
  localeComponents,
) {
  const initialTheme = {
    colorSchemes,
    shadows: shadows('light'),
    customShadows: customShadows('light'),
    shape: { borderRadius: 8 },
    components,
    typography,
    cssVarPrefix: '',
    shouldSkipGeneratingVar,
  };
 
  const theme = extendTheme(
    initialTheme,
    localeComponents,
  );
 
  return theme;
}
src/theme/create-theme.ts

With settings
export function createTheme(
  settings
) {
  const initialTheme = {
    colorSchemes,
    shadows: shadows(settings.colorScheme),
    customShadows: customShadows(settings.colorScheme),
    direction: settings.direction,
    shape: { borderRadius: 8 },
    components,
    typography,
    cssVarPrefix: '',
    shouldSkipGeneratingVar,
  };
 
  const updateTheme = updateCoreWithSettings(initialTheme, settings);
 
  const theme = extendTheme(
    updateTheme,
    updateComponentsWithSettings(settings),
  );
 
  return theme;
}
src/theme/create-theme.ts

Related files:
  • src/App.js or src/app/layout.js
  • src/components/settings