Configuration
Collapsed mode
Set the collapsed property to true to initialize a sidebar in the collapsed state:
const sidebar = new dhx.Sidebar("sidebar_container", {
css: "dhx_widget--border_right",
collapsed: true
});
Related sample: Sidebar. Collapsed
Minimal width
Use the minWidth property to set the minimal width of a sidebar in the collapsed state (the default value is 69px):
const sidebar = new dhx.Sidebar("sidebar_container", {
css: "dhx_widget--border_right",
minWidth: 80,
collapsed: true
});
Width
Use the width property to change the width of a sidebar (the default value is 200px). Set the value you need in the configuration object of the component:
const sidebar = new dhx.Sidebar("sidebar_container", {
css: "dhx_widget--border_right",
width: "450"
});