For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Toolbar Items

Include toolbar items in your Kizen app to link to pages or launch custom scripts.

Overview

Toolbar items appear in Kizen's global navigation (see Figure 1). Selecting a toolbar item launches a script that can navigate to other locations within Kizen or on the web, call the Kizen API, access external services, and more.

The Clock toolbar item from an app appears in Kizen's global navigation.
Figure 1: A toolbar item from an an app in Kizen's global navigation.

Note: Pages in your app can also add toolbar items, but these are strictly for navigation. For more information, see Pages.


Add a toolbar item to your app

Add your toolbar items to the toolbarItems directory in src. Place each toolbar item in its own subdirectory with config.json and script.js files, like this:

The following table describes these files:

File
Type
Purpose
Required?

config.json

JSON

The configuration file for the toolbar item

Yes

script.js

JavaScript

The script that runs when the user selects the toolbar item

Yes

For more information about the files, keep reading.

About config.json for toolbar items

The configuration file for a toolbar item sets the properties of the toolbar item:

The keys are as follows:

Key
Description
Required?

api_name

The API name of the toolbar item in all lowercase letters. If you don't specify a value for this key, the system automatically generates one based on the name of the toolbar item's subdirectory.

No

label

The text of the toolbar item.

Yes

icon

The name of the icon that appears next to the toolbar item's label. For information on the available icons, see the coding reference.

No

color

The color of the label and icon when the toolbar item is active. Set the value to a hexadecimal color code, CSS color, or color keyword.

No

when

A condition that determines when to show the toolbar item in the global navigation. For more information, see the coding reference.

No

About script.js for toolbar items

The JavaScript file for a toolbar item provides the code that executes when the user selects the item:

The script can use standard JavaScript, most web APIs available to Web Workers, and Kizen's runtime API. Because the script acts as the signed-in user, it can do whatever that user can do in Kizen, with the same permissions, and it knows their name and currently active business. However:

  • A toolbar item script doesn't know by itself which record the user is viewing. For record-specific tasks, use a record action instead, or write logic into the script that gets the user's URL and determines from that the current record.

  • A toolbar item script has no DOM access. It can display toasts and modals, and it can navigate to other pages, but it can't directly edit the content in the browser window.

  • A toolbar item script requires user interaction. It can't launch itself. For tasks that need to run automatically, use an agentic workflow code step instead.

  • A toolbar item script starts fresh on each run. To carry values from previous runs, store them in the user's configuration or as short-term session data. For details, see the coding reference.


Add an app toolbar item to the global navigation

When a user install your app, the app's toolbar items don't automatically appear in their global navigation. The user must manually add them to their toolbar layout.

To add an app toolbar item to the global navigation:

1

Open your user profile

In the global navigation, click your avatar, and select My Profile from the menu that appears.

2

Switch to your toolbar settings

Select My Toolbar.

3

Add the toolbar item to the global navigation

To add the toolbar item to the global navigation:

  1. In the Available Options list, find the toolbar item to add (see Figure 2).

A user finds the Clock toolbar item in the list of available options.
Figure 2: An app's toolbar item in the Available Options list.
  1. Drag the item to the Your Toolbar list, and drop it where you want to place it in the global navigation (see Figure 3).

The user drags the Clock toolbar item to the Your Toolbar list and positions it among the existing toolbar items.
Figure 3: The app's toolbar item in the Your Toolbar list.

Note: Use the mockup of the global navigation under Preview to help you set the order of the toolbar items.

  1. When you're satisfied with the placement, select Save.

Note: You can also add an app's toolbar items to a toolbar template. Depending on the template's settings, other users in your business can access it and apply it to their global navigation without dragging and dropping individual toolbar items. For more information, see our knowledge base.

After you add an app's toolbar items to the global navigation, uninstalling the app hides its toolbar items but doesn't remove them entirely. Reinstalling the app causes the toolbar items to reappear as they were. However, if you adjust your toolbar layout and save it while the app is uninstalled, reinstalling the app doesn't restore its toolbar items. You must add them again manually.

Note: Setting a when condition in the configuration file for the toolbar items overrides your toolbar layout. If the when condition doesn't apply, the toolbar items don't appear in the global navigation, even after you have added them.


What's next?

Continue to Create Floating Frames to learn how to include floating frames in your app.


Last updated

Was this helpful?