Creates a toolbar mounted inside the given element.
The host element that will contain the toolbar buttons.
Optional style/class overrides for the toolbar layout.
ProtectedhostProtectedconfigProtectedbuttonsClears toolbar DOM and internal button references.
Manually adds a button to the toolbar. This is useful for dynamically adding buttons after the toolbar has been created.
The definition of the button to add.
The HTMLButtonElement that was created and added to the toolbar.
Manually adds a separator to the toolbar. This is useful for dynamically adding separators after the toolbar has been created.
The HTMLDivElement that was created and added to the toolbar.
Sets the active state of a button.
The ID of the button.
Whether the button should be active.
Sets the enabled state of a button.
The ID of the button.
Whether the button should be enabled.
Gets a button by its ID.
The ID of the button.
The HTMLButtonElement if found, otherwise undefined.
ProtectedbuildCreates a button DOM element from the given definition and wires its click handler.
The button definition including id, icon, label, and callbacks.
The constructed HTMLButtonElement.
ProtectedresolveResolves a string icon reference or Element into a DOM element suitable for button content.
Optionalicon: string | ElementAn SVG sprite reference (e.g. '#icon-undo'), an img URL, raw SVG markup, or an Element.
The icon element, or null when no icon is provided.
A simple toolbar component that can be used to create a toolbar with buttons and separators. The toolbar can be customized with CSS classes and tooltip attributes. Buttons can be added with icons, labels, tooltips, and click event handlers. Buttons can also be toggled on/off and enabled/disabled.