Layout structure
DHTMLX Layout arranges the parts of your application into blocks. You can build three types of layout: horizontal, vertical, and mixed.
Horizontal layout
A horizontal layout consists of rows of cells placed one under another:
const layout = new dhx.Layout("layout_container", {
rows: [
{ header: "The header of the row 1" },
{ header: "The header of the row 2" },
{ header: "The header of the row 3" },
{ header: "The header of the row 4" }
]
});
Vertical layout
A vertical layout consists of columns of cells placed side by side:
const layout = new dhx.Layout("layout_container", {
cols: [
{ header: "The header of the column 1" },
{ header: "The header of the column 2" },
{ header: "The header of the column 3" },
{ header: "The header of the column 4" }
]
});
Mixed layout
A mixed layout combines rows and columns. A row can include several columns, and a column can contain rows:
const layout = new dhx.Layout("layout_container", {
rows: [
{
cols: [
{
header: "Block 1"
},
{
header: "Block 2"
}
]
},
{
rows: [
{
header: "Block 3"
},
{
header: "Block 4"
}
]
}
]
});