Angular UI Components Documentation
The Angular DockingLayout enables the creation of complex layouts with panels that can be floated, docked, nested, resized, pinned, unpinned and closed. This guide adds the Angular DockingLayout (jqxDockingLayout) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxdockinglayout 
In an Angular project (to start one, see Getting started with Angular), add the package with the Angular CLI. It asks for a theme and adds the styles to angular.json:
ng add jqwidgets-ng
Components are standalone: add jqxDockingLayoutModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxDockingLayoutModule } from 'jqwidgets-ng/jqxdockinglayout';
@Component({
selector: 'app-root',
imports: [jqxDockingLayoutModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Fluid Size demo.
<jqxDockingLayout #dockingLayoutReference [width]="'100%'" [height]="'90%'" [layout]="layout">
<!--The panel content divs can have a flat structure-->
<!--documentGroup-->
<div data-container="Document1Panel">
Document 1 content
</div>
<div data-container="Document2Panel">
Document 2 content
</div>
<!--bottom tabbedGroup-->
<div data-container="ErrorListPanel">
List of errors
</div>
<div data-container="OutputPanel">
Output
</div>
<!--right tabbedGroup-->
<div data-container="SolutionExplorerPanel">
Solution structure
</div>
<div data-container="PropertiesPanel">
List of properties
</div>
</jqxDockingLayout>
import { Component, ViewEncapsulation } from '@angular/core';
import { CommonModule } from '@angular/common';
import { jqxDockingLayoutModule } from 'jqwidgets-ng/jqxdockinglayout';
@Component({
imports: [CommonModule, jqxDockingLayoutModule],
selector: 'app-root',
templateUrl: './app.html',
styleUrl: './app.css',
encapsulation: ViewEncapsulation.None
})
export class App {
layout: any[] = this.generateLayout();
getWidth(): any {
if (document.body.offsetWidth < 800) {
return '90%';
}
return 800;
}
generateLayout(): any[] {
let layout = [
{
type: 'layoutGroup',
orientation: 'horizontal',
items: [
{
type: 'layoutGroup',
orientation: 'vertical',
width: '60%',
items: [
{
type: 'documentGroup',
height: '50%',
minHeight: '25%',
items: [
{
type: 'documentPanel',
title: 'Document 1',
contentContainer: 'Document1Panel'
},
{
type: 'documentPanel',
title: 'Document 2',
contentContainer: 'Document2Panel'
}
]
},
{
type: 'tabbedGroup',
height: '50%',
pinnedHeight: '10%',
items: [
{
type: 'layoutPanel',
title: 'Error List',
contentContainer: 'ErrorListPanel'
},
{
type: 'layoutPanel',
title: 'Output',
contentContainer: 'OutputPanel',
selected: true
}
]
}
]
},
{
type: 'tabbedGroup',
width: '40%',
items: [
{
type: 'layoutPanel',
title: 'Solution Explorer',
contentContainer: 'SolutionExplorerPanel'
},
{
type: 'layoutPanel',
title: 'Properties',
contentContainer: 'PropertiesPanel'
}
]
}
]
}
];
return layout;
}
}.jqx-layout-group-auto-hide-content-vertical {
width: 200px;
}
html, body {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, dock: This event is triggered when a floatGroup has been docked.
<jqxDockingLayout (onDock)="onDock($event)"></jqxDockingLayout>
onDock(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, refresh: Refreshes the widget.
<jqxDockingLayout #myDockingLayout></jqxDockingLayout>
import { Component, viewChild } from '@angular/core';
import { jqxDockingLayoutModule, jqxDockingLayoutComponent } from 'jqwidgets-ng/jqxdockinglayout';
@Component({
selector: 'app-root',
imports: [jqxDockingLayoutModule],
templateUrl: './app.html'
})
export class App {
readonly myDockingLayout = viewChild.required<jqxDockingLayoutComponent>('myDockingLayout');
run(): void {
this.myDockingLayout().refresh();
}
}