Skip to main content

Collapsing and Reordering Property Groups in the Editor

By default, all property groups in the Unlayer editor are expanded. If you want certain groups to remain collapsed by default, or wish to reorder them for a customized layout, you can configure these behaviors in your unlayer.init() settings.

Khizar Tanveer avatar
Written by Khizar Tanveer
Updated over 3 months ago

Collapse Specific Property Groups

Use the collapsed property under the editor configuration to keep a property group closed by default.

unlayer.init({
tools: {
button: {
sections: {
buttonOptions: {
editor: {
enabled: true,
collapsed: true
}
}
}
}
}
});

In this example, the Button Options section will remain collapsed when the editor loads.

Reorder Property Groups

To change the order in which property groups appear in the editor, use the position property.

unlayer.init({
tools: {
button: {
sections: {
buttonOptions: {
editor: {
enabled: true,
collapsed: true,
position: 3
}
}
}
}
}
});

Here, the Button Options group will appear at position 3 within the editor’s property panel.

Important Note

The Action property group (where the button link or call-to-action is defined) has a fixed position and cannot be reordered due to its functional importance.

Property Explanation

Property

Description

tools

The main configuration object for all available tools (e.g., image, text, button).

button

Refers specifically to the Button Tool.

sections

Defines various groups or sections of editable properties within a tool.

buttonOptions

The property group controlling button-specific options (e.g., style, color, text).

editor.collapsed

When set to true, the group remains collapsed by default.

editor.position

Specifies the order of the property group within the sidebar panel.

Did this answer your question?