Reactium
Search
K

Configuration

You can modify the default behavior of the Toolkit by overriding the configuration object:
Properties
Default
Property
Type
Description
brand
Node
String or component used to display the brand name
info
Node
String or component used to display version info
titlebar
String
Text used in the Titlebar of the browser
sidebar
Object
Sidebar configuration object
sidebar.collapsed
Boolean
Collapsed state of the Sidebar. Default: true
sidebar.position
String
Position of the Sidebar. Default: left
sidebar.width
Number
Width of the Sidebar when expanded. Default: 320
{
brand: 'Reactium',
info: 'Toolkit version %ver',
titlebar: 'Reactium | Toolkit',
sidebar: {
collapsed: true,
position: Reactium.Toolkit.Sidebar.position.left,
width: 320,
},
};
Note: The initial Sidebar configuration is overridden by user preferences.
/MyPlugin/reactium-hooks.js
import Reactium from 'reactium-core/sdk';
Reactium.Plugin.register('MyPlugin').then(() => {
// Ensure the toolkit plugin is available
if (!Reactium.Toolkit) return;
// Override sidebar width
Reactium.Toolkit.setConfig('sidebar.width', 480);
});
The Toolkit SDK exposes a read-only property for the configuration object:
Reactium.Toolkit.config
import React from 'react';
import Reactium from 'reactium-core/sdk';
const MyComponent = () => {
const config = Reactium.Toolkit.config;
console.log(config);
return <div>My Plugin</div>;
};