ComPDFKit Web SDK
    Preparing search index...

    Class RibbonGroup

    The group that holds the ribbon items of a header (the tabs that switch between toolbars).

    Hierarchy (View Summary)

    Index
    • Ribbon groups only accept RibbonItem, and other groups do not accept RibbonItem. Returns the error message, or false.

      Parameters

      • items: (string | object)[]

      Returns string | false

    • Sets the space between items. Invalid values (negative or not a number) are ignored with a warning.

      Parameters

      • gap: number

        Space in pixels.

      Returns void

    • Sets how much the group grows to fill its header. Invalid values (negative or not a number) are ignored with a warning.

      Parameters

      • grow: number

        Flex grow factor.

      Returns void

    • Replaces the items of the group. New item objects are registered in the UI; a ribbon group only accepts ribbon items and other groups do not accept them (invalid lists are ignored with a warning).

      Parameters

      • items: (string | object)[]

        Item objects, or dataElements of existing items.

      Returns void

    • Sets how items are distributed along the group. Values outside the supported list are ignored with a warning.

      Parameters

      • justifyContent: string

        One of 'start', 'end', 'center', 'space-between', 'space-around', 'space-evenly'.

      Returns void

    • Replaces the inline CSS styles of the group and updates it on screen.

      Parameters

      • style: Record<string, unknown>

        CSS property names (camelCase) mapped to their values.

      Returns void

    • For flattening: the instance's own fields plus its own gap / grow / justifyContent (not read from the store, so a new instance with the same name does not bring back old values).

      Returns Record<string, unknown>

    alwaysVisible: boolean

    Whether the group stays visible regardless of the active ribbon item.

    dataElement: string

    Unique name of the group.

    gap: number

    Space between items, in pixels.

    grow: number

    Flex grow factor of the group within its header (0 means it does not grow).

    headerDirection?: string

    Direction of the header the ribbon is placed in; kept with the group's data and does not affect the layout.

    headerPlacement?: string

    Placement of the header the ribbon is placed in; kept with the group's data and does not affect the layout.

    hidden?: boolean | string[]

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

    items: (string | object)[]

    Items in the group, in display order; strings refer to existing items by dataElement.

    justifyContent: string | undefined

    How items are distributed along the group ('start', 'end', 'center', 'space-between', 'space-around' or 'space-evenly').

    label?: string

    Optional label of the group.

    placement?: string

    Placement value kept with the group's data; it does not affect the layout.

    position?: string

    Position value kept with the group's data; it does not affect the layout.

    style: Record<string, unknown>

    Inline CSS styles applied to the group's element.

    type: string

    Item type: 'groupedItems' ('ribbonGroup' for ribbon groups).