Angular UI Components Documentation
The Angular ListBox displays a list of selectable items. This guide adds the Angular ListBox (jqxListBox) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxlistbox 
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 jqxListBoxModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxListBoxModule } from 'jqwidgets-ng/jqxlistbox';
@Component({
selector: 'app-root',
imports: [jqxListBoxModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<jqxListBox #jqxListBox
[selectedIndex]="3"
[source]="source"
[width]="200"
[height]="250">
</jqxListBox>
import { Component } from '@angular/core';
import { jqxListBoxComponent } from 'jqwidgets-ng/jqxlistbox';
import { CommonModule } from '@angular/common';
import { jqxListBoxModule } from 'jqwidgets-ng/jqxlistbox';
@Component({
imports: [CommonModule, jqxListBoxModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {
source: string[] = [
'Affogato',
'Americano',
'Bicerin',
'Breve',
'Café Bombón',
'Café au lait',
'Caffé Corretto',
'Café Crema',
'Caffé Latte',
'Caffé macchiato',
'Café mélange',
'Coffee milk',
'Cafe mocha',
'Cappuccino',
'Carajillo',
'Cortado',
'Cuban espresso',
'Espresso',
'Eiskaffee',
'The Flat White',
'Frappuccino',
'Galao',
'Greek frappé coffee',
'Iced Coffee',
'Indian filter coffee',
'Instant coffee',
'Irish coffee',
'Liqueur coffee'
];
}
Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, change: This event is triggered when the user selects an item.
<jqxListBox (onChange)="onChange($event)"></jqxListBox>
onChange(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, val: Sets or gets the selected value.
<jqxListBox #myListBox></jqxListBox>
import { Component, viewChild } from '@angular/core';
import { jqxListBoxModule, jqxListBoxComponent } from 'jqwidgets-ng/jqxlistbox';
@Component({
selector: 'app-root',
imports: [jqxListBoxModule],
templateUrl: './app.html'
})
export class App {
readonly myListBox = viewChild.required<jqxListBoxComponent>('myListBox');
run(): void {
const value = this.myListBox().val();
console.log(value);
}
}