Skip to main content

Workspace

The Workspace component provides a flexible full-screen layout designed for building comprehensive, multi-pane views within the GridStudio interface. It is structured as a three-column layout:

  • Left Column (optional): Often used for menus or navigation panels. Can be collapsible.
  • Center Column: The main content area where views are rendered. This is the widest section and the core of the workspace.
  • Right Column (optional): A fixed-width area for auxiliary widgets or contextual information.

This structure allows developers to create rich, responsive dashboards or management interfaces, especially when combined with the built-in Tab component for organizing content in the center pane.


Usage

To render a Workspace, your Custom View function should return an object describing the layout and tab configuration. The example below demonstrates a standard use case with collapsible left panel and a tab-based content structure in the center column.

CustomFunction(async function ({ sdk }, reject, resolve) {
resolve(async function CustomFunction({ sdk }) {
return {
isTemplateLeftCollapsible: true,
tabs: {
name: 'bbTabs',
queryParamKey: 'bbTab',
isNoPadding: true,
listHeader: {
title: 'BaytiBot',
iconName: 'robot',
},
panes: [
{
id: 'leads',
iconName: 'crown',
text: 'Leads',
isActive: true,
customFunctionPathString: sdk.utils.absolutePathString('leads/index.js'),
},
{
id: 'appointments',
iconName: 'calendar',
text: 'Appointments',
isActive: false,
customFunctionPathString: sdk.utils.absolutePathString('appointments/index.js'),
},
{
id: 'properties',
iconName: 'building',
text: 'Properties',
isActive: false,
customFunctionPathString: sdk.utils.absolutePathString('properties/index.js'),
},
{
id: 'projects',
iconName: 'strategy',
text: 'Projects',
isActive: false,
customFunctionPathString: sdk.utils.absolutePathString('projects/index.js'),
},
{
id: 'settings',
iconName: 'gear-six',
text: 'Settings',
isActive: false,
customFunctionPathString: sdk.utils.absolutePathString('settings/index.js'),
},
],
},
}
})
})

Parameters

KeyTypeDescription
isTemplateLeftCollapsiblebooleanEnables or disables collapsibility of the left column.
tabs.namestringUnique identifier for the tab group.
tabs.queryParamKeystringURL query key used to persist the selected tab state.
tabs.isNoPaddingbooleanRemoves internal padding inside the tab pane area.
tabs.listHeader.titlestringTitle displayed at the top of the tab pane.
tabs.listHeader.iconNamestringIcon shown next to the title.
tabs.panes[]arrayDefines each tab item and the function it loads.
panes[].idstringUnique tab identifier.
panes[].iconNamestringIcon name to represent the tab.
panes[].textstringLabel text shown on the tab.
panes[].isActivebooleanMarks the tab as initially active. Only one should be true.
panes[].customFunctionPathStringstringPath to the function that renders the view for the tab.

Tips

  • Use sdk.utils.absolutePathString(path) to dynamically resolve full paths to other custom functions.
  • Keep only one tab as isActive: true to avoid rendering conflicts.
  • You can dynamically show or hide panes using conditions, allowing role-based UI customization.