Optional label for the action. This is used for accessibility and tooltips.
OptionaltooltipOptional tooltip text for the action. This is displayed on hover.
OptionalshortcutOptional keyboard shortcut for the action. This is displayed in the tooltip and can be used to trigger the action.
OptionaliconOptional icon for the action. This can be an SVG use href (e.g. '#icon-undo'), a URL string, or an Element.
OptionaltoggleWhether the action is a toggle action. Toggle actions can be in an active or inactive state.
Called when the button is clicked; receives the diagram view.
OptionalisReturns true when the button should be enabled; defaults to always enabled.
OptionalisReturns true when the button should appear active/pressed.
Unique identifier for the action. This is used to reference the action in the toolbar.