Configuring RapidAdminReact®
There is a single configuration file which gives you multiple options to configure the various elements and behavious of RapidAdminReact®. You need to edit the settings.js
to modify various properties.
./config
├── rapidAdmin
│ └── settings.js
Configuration Options
The settings.js
file exports a single object which is further classified info object that is intended to modify a particular functionality of RapidAdminReact®.
// Example of the settings object
const settings = {
config : {
appUrl : 'http://localhost:3000/' , // The URL of your application which is applied to the logo as well
router : 'browser' , // use 'hash' if you need to replace the BrowserRouter with the HashRouter
theme : 'light' , // The option to choose between the `light` and the `dark` theme
} ,
};
Various Configuration Options Available
Object | Key | Default | Utility |
---|---|---|---|
config | appUrl | http://localhost:3000/ |
The URL of your application which is applied to the logo as well |
config | router | browser |
Use ‘hash’ if you need to replace the BrowserRouter with the HashRouter |
config | theme | light |
‘context’ , // The option to choose between the 'light' and the 'dark' theme. Use 'context' if you are using auto switching between the dark and the light theme |
config | themeDirection | ltr |
Choose between ltr and rtl theme. Use 'context' if you are using auto switching between the 'ltr' and 'rtl' languages |
config | redux | true |
Set to false if you want to disable Redux in your application |
config | desktopBreakpoint | md |
Set the default breakpoint for Desktop Below this mobile components will load. Possible values are lg , md , sm . |
sidebar | drawerWidth | 280 |
The width of the sidebar when its in open state |
user | defaultRedirect | routePaths.signIn |
Default path to redirect the user when she is not logged into Rapid Admin React |
user | redirectWhenAuth | routePaths.dashboard |
Path to redirect the user to when the user is Authenticated Successfully |
scrollBars | width | 6px |
The width of the scrollbars globally, applied to height in case of horizontal scrollbars. Overrides the default browser scrollbars for all the components to keep them consistent across all the browsers. |