Skip to main content

Spacer

The Spacer control adds empty space on the ribbon and helps you align controls.

Ribbon with a spacer adding empty space between button groups in DHTMLX Suite

Add Spacer​

Use the add() method of TreeCollection to add a Spacer control to a ribbon:

ribbon.data.add({
type:"spacer"
});

Related sample: Ribbon. Spacer

Properties​

Check the list of properties that you can set in the configuration object of a Spacer control.

Show and hide Spacer​

The show() and hide() methods of Ribbon show and hide a Spacer control by its ID:

ribbon.show(id);
ribbon.hide(id);