ComPDFKit Web SDK
    Preparing search index...

    Class RibbonItem

    Ribbon item: can only be placed in a RibbonGroup; a single groupedItems string becomes an array (an empty array when omitted).

    Hierarchy (View Summary)

    Index
    • Creates a ribbon item.

      Parameters

      • props: { [x: string]: unknown }

        dataElement, label, img, title, toolbarGroup, groupedItems (a dataElement or an array of them).

      Returns RibbonItem

    • Replaces the inline CSS styles of the item and updates it on screen when it is already in the UI.

      Parameters

      • style: Record<string, unknown>

        CSS property names (camelCase) mapped to their values.

      Returns void

    className?: string

    Extra CSS class names added to the item's element.

    dataElement: string

    Unique name of the item; used to find, show, hide or update it later.

    direction?: string

    Direction value kept with the item's data; it does not affect the layout.

    disabled?: boolean

    Whether the item is disabled (rendered but not clickable).

    groupedItems: string[]

    dataElements of the grouped items shown while this ribbon tab is selected.

    hidden?: boolean | string[]

    Hides the item: true always hides it; an array of screen sizes ('desktop', 'tablet', 'mobile', 'small-mobile') hides it only on those screen sizes.

    img?: string

    Icon of the ribbon tab.

    label?: string

    Text shown on the ribbon tab, or a translation key.

    style?: Record<string, unknown>

    Inline CSS styles applied to the item's element.

    title?: string

    Tooltip text, or a translation key that is resolved in the current language.

    toolbarGroup?: string

    Toolbar group activated when the ribbon tab is selected; defaults to the item's dataElement.

    type?: string

    Item type (for example 'customButton', 'toolButton', 'divider'); set by each subclass.