Toolbar Elements

If you have created an element using the ARCLI you will notice that the generated component uses the Element wrapper component:

/Reactium Project/src/app/component/Toolkit/Test/index.js
import React from 'react';
import { useHookComponent } from 'reactium-core/sdk';

export default () => {
    const { Element } = useHookComponent('RTK');

    return <Element title='Test'>Test Element</Element>;
};

The Element wrapper component adds the Toolbar component which has a zone included that allows you to add elements to the Toolbar.

Toolbar Zone

Adding Toolbar Elements

You can add Toolbar elements by registering a component with the Toolkit SDK.

You can temporarily register Toolbar elements within a useEffect:

Using the Element wrapper component, you can add temporary Toolbar elements by specifying the toolbar property:

Registry Object

Property

Type

Description

align

String

The horizontal alignment of the component[left|right|center]

component

Node

React element to insert

order

Number

Index used to list the Toolbar components when rendering

Last updated