Skip to content

WorkspaceRibbon.addRibbonItemButton method

WorkspaceRibbon › addRibbonItemButton

Unofficial

Adds a ribbon item button.

Signature:

addRibbonItemButton(id: string, icon: string, title: string, callback: (evt: MouseEvent) => unknown): HTMLElement

Parameters:

Parameter Type Description
id string The unique identifier of the item.
icon string The lucide icon name.
title string The tooltip title.
callback (evt: MouseEvent) => unknown The click handler.

Returns: HTMLElementThe created button element.