Project Configuration
Configuration option for whole Template
Mantis has a single source of truth for default configuration, which lets users manage it effectively. It also makes it scalable for new configurations. You can set configs like font, border, theme layout, locale, etc. All those can be configured at src/config
fontFamily
'Roboto', sans-serif
String
set font family
mode
light
String
light, dark
i18n
en
String
en
- English
fr
- français
ro
- Română
zh
- 中国人
themeDirection
ltr
boolean
set layout from
right to left.
miniDrawer
false
boolean
true,
false
container
true
boolean
see layout in stretch
presetColor
default
string
different preset for theme.
config.ts
// types
import { DefaultConfigProps } from 'types/config';
// ==============================|| THEME CONSTANT ||============================== //
export const twitterColor = '#1DA1F2';
export const facebookColor = '#3b5998';
export const linkedInColor = '#0e76a8';
export const APP_DEFAULT_PATH = '/dashboard/analytics';
export const HORIZONTAL_MAX_ITEM = 7;
export const DRAWER_WIDTH = 260;
export const MINI_DRAWER_WIDTH = 60;
export enum SimpleLayoutType {
SIMPLE = 'simple',
LANDING = 'landing'
}
export enum ThemeMode {
LIGHT = 'light',
DARK = 'dark'
}
export enum MenuOrientation {
VERTICAL = 'vertical',
HORIZONTAL = 'horizontal'
}
export enum ThemeDirection {
LTR = 'ltr',
RTL = 'rtl'
}
export enum NavActionType {
FUNCTION = 'function',
LINK = 'link'
}
export enum Gender {
MALE = 'Male',
FEMALE = 'Female'
}
export enum DropzoneType {
DEFAULT = 'default',
STANDARD = 'standard'
}
export enum AuthProvider {
JWT = 'jwt',
FIREBASE = 'firebase',
AUTH0 = 'auth0',
AWS = 'aws',
SUPABASE = 'supabase'
}
export const APP_AUTH: AuthProvider = AuthProvider.JWT;
// ==============================|| THEME CONFIG ||============================== //
const config: DefaultConfigProps = {
fontFamily: `'Public Sans', sans-serif`,
i18n: 'en',
menuOrientation: MenuOrientation.VERTICAL,
miniDrawer: false,
container: true,
mode: ThemeMode.LIGHT,
presetColor: 'default',
themeDirection: ThemeDirection.LTR
};
export default config;
config.js
// ==============================|| THEME CONSTANT ||============================== //
export const twitterColor = '#1DA1F2';
export const facebookColor = '#3b5998';
export const linkedInColor = '#0e76a8';
export const APP_DEFAULT_PATH = '/dashboard/analytics';
export const HORIZONTAL_MAX_ITEM = 7;
export const DRAWER_WIDTH = 260;
export const MINI_DRAWER_WIDTH = 60;
export let SimpleLayoutType;
(function (SimpleLayoutType) {
SimpleLayoutType['SIMPLE'] = 'simple';
SimpleLayoutType['LANDING'] = 'landing';
})(SimpleLayoutType || (SimpleLayoutType = {}));
export let ThemeMode;
(function (ThemeMode) {
ThemeMode['LIGHT'] = 'light';
ThemeMode['DARK'] = 'dark';
})(ThemeMode || (ThemeMode = {}));
export let MenuOrientation;
(function (MenuOrientation) {
MenuOrientation['VERTICAL'] = 'vertical';
MenuOrientation['HORIZONTAL'] = 'horizontal';
})(MenuOrientation || (MenuOrientation = {}));
export let ThemeDirection;
(function (ThemeDirection) {
ThemeDirection['LTR'] = 'ltr';
ThemeDirection['RTL'] = 'rtl';
})(ThemeDirection || (ThemeDirection = {}));
export let NavActionType;
(function (NavActionType) {
NavActionType['FUNCTION'] = 'function';
NavActionType['LINK'] = 'link';
})(NavActionType || (NavActionType = {}));
export let Gender;
(function (Gender) {
Gender['MALE'] = 'Male';
Gender['FEMALE'] = 'Female';
})(Gender || (Gender = {}));
export let DropzoneType;
(function (DropzoneType) {
DropzoneType['DEFAULT'] = 'default';
DropzoneType['STANDARD'] = 'standard';
})(DropzoneType || (DropzoneType = {}));
export let AuthProvider;
(function (AuthProvider) {
AuthProvider['JWT'] = 'jwt';
AuthProvider['FIREBASE'] = 'firebase';
AuthProvider['AUTH0'] = 'auth0';
AuthProvider['AWS'] = 'aws';
AuthProvider['SUPABASE'] = 'supabase';
})(AuthProvider || (AuthProvider = {}));
export const APP_AUTH = AuthProvider.JWT;
// ==============================|| THEME CONFIG ||============================== //
const config = {
fontFamily: `'Public Sans', sans-serif`,
i18n: 'en',
menuOrientation: MenuOrientation.VERTICAL,
miniDrawer: false,
container: true,
mode: ThemeMode.LIGHT,
presetColor: 'default',
themeDirection: ThemeDirection.LTR
};
export default config;
config.ts
// next
import { Public_Sans } from 'next/font/google';
// types
import { DefaultConfigProps } from 'types/config';
// ==============================|| THEME CONSTANT ||============================== //
export const twitterColor = '#1DA1F2';
export const facebookColor = '#3b5998';
export const linkedInColor = '#0e76a8';
export const APP_DEFAULT_PATH = '/dashboard/analytics';
export const HORIZONTAL_MAX_ITEM = 7;
export const DRAWER_WIDTH = 260;
export const MINI_DRAWER_WIDTH = 60;
const publicSans = Public_Sans({ subsets: ['latin'], weight: ['400', '500', '300', '600', '700'] });
export enum SimpleLayoutType {
SIMPLE = 'simple',
LANDING = 'landing'
}
export enum ThemeMode {
LIGHT = 'light',
DARK = 'dark'
}
export enum MenuOrientation {
VERTICAL = 'vertical',
HORIZONTAL = 'horizontal'
}
export enum ThemeDirection {
LTR = 'ltr',
RTL = 'rtl'
}
export enum NavActionType {
FUNCTION = 'function',
LINK = 'link'
}
export enum Gender {
MALE = 'Male',
FEMALE = 'Female'
}
export enum DropzoneType {
DEFAULT = 'default',
STANDARD = 'standard'
}
// ==============================|| THEME CONFIG ||============================== //
const config: DefaultConfigProps = {
fontFamily: publicSans.style.fontFamily,
i18n: 'en',
menuOrientation: MenuOrientation.VERTICAL,
miniDrawer: false,
container: true,
mode: ThemeMode.LIGHT,
presetColor: 'default',
themeDirection: ThemeDirection.LTR
};
export default config;
config.js
// next
import { Public_Sans } from 'next/font/google';
// ==============================|| THEME CONSTANT ||============================== //
export const twitterColor = '#1DA1F2';
export const facebookColor = '#3b5998';
export const linkedInColor = '#0e76a8';
export const APP_DEFAULT_PATH = '/dashboard/analytics';
export const HORIZONTAL_MAX_ITEM = 7;
export const DRAWER_WIDTH = 260;
export const MINI_DRAWER_WIDTH = 60;
const publicSans = Public_Sans({ subsets: ['latin'], weight: ['400', '500', '300', '600', '700'] });
export let SimpleLayoutType;
(function (SimpleLayoutType) {
SimpleLayoutType['SIMPLE'] = 'simple';
SimpleLayoutType['LANDING'] = 'landing';
})(SimpleLayoutType || (SimpleLayoutType = {}));
export let ThemeMode;
(function (ThemeMode) {
ThemeMode['LIGHT'] = 'light';
ThemeMode['DARK'] = 'dark';
})(ThemeMode || (ThemeMode = {}));
export let MenuOrientation;
(function (MenuOrientation) {
MenuOrientation['VERTICAL'] = 'vertical';
MenuOrientation['HORIZONTAL'] = 'horizontal';
})(MenuOrientation || (MenuOrientation = {}));
export let ThemeDirection;
(function (ThemeDirection) {
ThemeDirection['LTR'] = 'ltr';
ThemeDirection['RTL'] = 'rtl';
})(ThemeDirection || (ThemeDirection = {}));
export let NavActionType;
(function (NavActionType) {
NavActionType['FUNCTION'] = 'function';
NavActionType['LINK'] = 'link';
})(NavActionType || (NavActionType = {}));
export let Gender;
(function (Gender) {
Gender['MALE'] = 'Male';
Gender['FEMALE'] = 'Female';
})(Gender || (Gender = {}));
export let DropzoneType;
(function (DropzoneType) {
DropzoneType['DEFAULT'] = 'default';
DropzoneType['STANDARD'] = 'standard';
})(DropzoneType || (DropzoneType = {}));
// ==============================|| THEME CONFIG ||============================== //
const config = {
fontFamily: publicSans.style.fontFamily,
i18n: 'en',
menuOrientation: MenuOrientation.VERTICAL,
miniDrawer: false,
container: true,
mode: ThemeMode.LIGHT,
presetColor: 'default',
themeDirection: ThemeDirection.LTR
};
export default config;
Last updated