The NavBar component for Angular represents a small widget which is built from UL and LI tags. It can be used for creating responsive horizontal/vertical layouts or simple navigation menus.
npm install -g @angular/cli ng new jqwidgets-project cd jqwidgets-project
ng add jqwidgets-ngAlternatively, you can use the standard installation (Manual Setup)
jQWidgets UI for Angular is distributed as jqwidgets-ng NPM package
npm install jqwidgets-ng
@import 'jqwidgets-ng/jqwidgets/styles/jqx.base.css';
"styles": [ "node_modules/jqwidgets-ng/jqwidgets/styles/jqx.base.css" ]
<div style="width: 80%;">
NavBar with 2 Items. Each item is with 50% width.
<br />
<jqxNavBar [theme]="'fluent'" id="navBar1" [height]="40" [selectedItem]="0">
<ul>
<li>1</li>
<li>2</li>
</ul>
</jqxNavBar>
<br />
NavBar with 3 Items. Each item is with 33.33% width.
<br />
<jqxNavBar [theme]="'fluent'" id="navBar2" [height]="40" [selectedItem]="0">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</jqxNavBar>
<br />
NavBar with 4 Items. Each item is with 25% width.
<br />
<jqxNavBar [theme]="'fluent'" id="navBar3" [height]="40" [selectedItem]="0">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
</jqxNavBar>
<br />
NavBar with 5 Items. Each item is with 20% width.
<br />
<jqxNavBar [theme]="'fluent'" id="navBar4" [height]="40" [selectedItem]="0">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</jqxNavBar>
<br />
NavBar with more than 5 Items. Items are displayed in 2 columns and each item is with 50% width.
<br />
<jqxNavBar [theme]="'fluent'" id="navBar5" [height]="160" [selectedItem]="0">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
</ul>
</jqxNavBar>
<br />
NavBar with "columns" set to ["30%", "50%", "20%"].
<br />
<jqxNavBar [theme]="'fluent'" id="navBar6" [height]="40" [selectedItem]="0" [columns]="['30%', '50%', '20%']">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</jqxNavBar>
</div>
import { Component } from '@angular/core';
import { jqxNavBarModule, jqxNavBarComponent } from 'jqwidgets-ng/jqxnavbar';
@Component({
selector: 'app-root',
imports: [jqxNavBarModule],
standalone: true,
templateUrl: './app.component.html'
})
export class AppComponent {
}