Class: RibbonItem

UI.Components. RibbonItem


new RibbonItem(properties)

Creates a new instance of RibbonItem.
Parameters:
Name Type Description
properties Object An object that contains the properties of the Ribbon Item.
Properties
Name Type Argument Description
dataElement string <optional>
The data element of the ribbon item.
title string <optional>
The tooltip of the ribbon item.
disabled boolean <optional>
Whether the item is disabled or not.
label string <optional>
The label of the item.
img string <optional>
The icon of the item.
toolbarGroup string <optional>
The group that the item belongs to.
style object <optional>
An object defining inline CSS styles for the ribbon, where each key represents a CSS property and its corresponding value.
className string <optional>
String with CSS classes to be applied to the ribbon, allowing additional styling and customization through external stylesheets.
groupedItems Array.<UI.Components.Item> <optional>
Grouped Items to be contained by the RibbonItem.
Example
const ribbonItem = new instance.UI.Components.RibbonItem({
  dataElement: 'toolbarGroup-Annotate',
  title: 'Annotate',
  type: 'ribbonItem',
  label: 'Annotate',
  groupedItems: [
    'annotateGroupedItems'
  ],
  toolbarGroup: 'toolbarGroup-Annotate'
});

Extends

Methods


setStyle(style)

Sets the style of the Item (padding, border, background, etc.)
Parameters:
Name Type Description
style Object An object that can change the CSS style of the Item component.
Inherited From: