Skip to content

Vizel API / core/src / buildVizelToolbarSpec

Function: buildVizelToolbarSpec()

ts
function buildVizelToolbarSpec(commands, options): readonly VizelCommandSpec[];

Defined in: packages/core/src/builders/toolbar.ts:25

Build the toolbar spec from a VizelCommand array.

Filters by surfaces.toolbar, sorts by priority ascending (lower priority appears first), and projects each command into a VizelCommandSpec. The framework VizelToolbar component iterates the result to render its buttons.

Parameters

ParameterType
commandsreadonly VizelCommand[]
optionsVizelToolbarSpecOptions

Returns

readonly VizelCommandSpec[]

Released under the MIT License.