Angular PrimeNG Splitter Properties
Last Updated :
26 Apr, 2025
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see how to use Splitter Properties in Angular PrimeNG.
The Splitter Component allows a user to split two-element using a splitter & utilized it separately and resize panels. There are various properties for Splitter facilitated by Angular PrimeNG, that can be used to enhance the overall the user-experience by implementing the properties.
Angular PrimeNG Splitter Properties:
- panelSizes: It is used to specify the size of the. It is of number data type & the default value is null.
- minSizes: It is used to specify the minimum size of the elements. It is of number data type & the default value is null.
- layout: It is used to set the orientation of the panels. It is of string data type & the default value is horizontal.
- gutterSize: It is used to specify the size of the divider in pixels. It is of number data type & the default value is 4.
- stateKey: It is used to specify the storage identifier of a stateful Splitter. It is of string data type & the default value is null.
- stateStorage: It is used to define where a stateful splitter keeps its state. It is of string data type & the default value is session.
- style: It is used to specify the inline style of the component. It is of object data type & the default value is null.
- styleClass: It is used to specify the style class of the component. It is of string data type & the default value is null.
- panelStyleClass: It is used to specify the style class of the panel. It is of string data type & the default value is null.
- panelStyle: It is used to specify the inline style of the panel. It is of object data type & the default value is null.
Creating Angular application & module installation:
Step 1: Create an Angular application using the following command.
ng new appname
Step 2: After creating your project folder i.e. appname, move to it using the following command.
cd appname
Step 3: Install PrimeNG in your given directory.
npm install primeng --save
npm install primeicons --save
Project Structure: It will look like the following:
 - Steps to run the application: To run the above file run the below command:
ng serve --save
Example 1: Below is the example code that illustrates the use of Angular PrimeNG Splitter Properties using layout property.Â
HTML
<h1 style="color: green">
GeeksforGeeks
</h1>
<h4>Angular PrimeNG Splitter Properties</h4>
<h5>Horizontal Splitter</h5>
<p-splitter layout="horizontal">
<ng-template pTemplate>
<div class="p-col p-ai-center p-jc-center">
Angular PrimeNG is a framework used with angular
to create components with great styling and this
framework is very easy to use and is used to make
responsive websites.
</div>
</ng-template>
<ng-template pTemplate>
<div class="p-col p-ai-center p-jc-center">
Angular PrimeNG is a framework used with angular
to create components with great styling and this
framework is very easy to use and is used to make
responsive websites.
</div>
</ng-template>
</p-splitter>
<h5>Vertical Splitter</h5>
<p-splitter layout="vertical"
[style]="{'height': '150px'}">
<ng-template pTemplate>
<div class="p-col p-ai-center p-jc-center">
Angular PrimeNG is a framework used with angular
to create components with great styling and this
framework is very easy to use and is used to make
responsive websites.
</div>
</ng-template>
<ng-template pTemplate>
<div class="p-col p-ai-center p-jc-center">
Angular PrimeNG is a framework used with angular
to create components with great styling and this
framework is very easy to use and is used to make
responsive websites.
</div>
</ng-template>
</p-splitter>
JavaScript
import { Component } from "@angular/core";
@Component({
selector: "app-root",
templateUrl: "./app.component.html"
})
export class AppComponent {}
JavaScript
import { NgModule } from "@angular/core";
import { BrowserModule }
from "@angular/platform-browser";
import { BrowserAnimationsModule }
from "@angular/platform-browser/animations";
import { AppComponent } from "./app.component";
import { SplitterModule } from "primeng/splitter";
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
SplitterModule,
],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
Output:
 Example 2: Below is another example that illustrates the use of Angular PrimenG Splitter Properties using the panelSizes and minSizes properties.Â
HTML
<div style="text-align: center">
<h2 style="color:green">
GeeksforGeeks
</h2>
<h5>Angular PrimeNG Splitter Properties</h5>
</div>
<p-splitter [panelSizes]="[60, 40]"
[minSizes]="[20, 40]">
<ng-template pTemplate>
<div class="p-col p-ai-center p-jc-center">
<img alt="gfg" src=
"https://media.geeksforgeeks.org/wp-content/uploads/20220807104303/dsaselfpacedcourseoverviewimage-300x289.png" />
</div>
</ng-template>
<ng-template pTemplate>
<div class="p-col p-ai-center p-jc-center">
<img alt="gfg" src=
"https://media.geeksforgeeks.org/wp-content/uploads/20220807104255/completeinterviewpreparationcourseoverviewimage-300x289.png" />
</div>
</ng-template>
</p-splitter>
JavaScript
import { Component } from "@angular/core";
@Component({
selector: "app-root",
templateUrl: "./app.component.html"
})
export class AppComponent {}
JavaScript
import { NgModule } from "@angular/core";
import { BrowserModule }
from "@angular/platform-browser";
import { BrowserAnimationsModule }
from "@angular/platform-browser/animations";
import { AppComponent } from "./app.component";
import { SplitterModule } from "primeng/splitter";
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
SplitterModule,
],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
Output:
Â
Reference: https://primefaces.org/primeng/splitter
Similar Reads
Angular PrimeNG Sidebar Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will learn how to use the Sidebar Properties in Angular PrimeNG. The Sidebar Com
5 min read
Angular PrimeNG Tree Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more.
6 min read
Angular PrimeNG Table Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more.
12 min read
Angular PrimeNG Tag Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see Angular PrimeNG Tag Properties. A tag component is used to create tags
3 min read
Angular PrimeNG TreeTable Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more.
10 min read
Angular PrimeNG Toolbar Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will learn how to use the Toolbar Properties in Angular PrimeNG. The Toolbar Co
3 min read
Angular PrimeNG TieredMenu Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will learn how to use the TieredMenu Properties in Angular PrimeNG. We will also
4 min read
Angular PrimeNG Dock Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more.
4 min read
Angular PrimeNG Chip Properties
Angular PrimeNG is a UI component catalog for angular applications. It consists of a wide range of UI components that help in making fast and scalable websites. In this article, we will see Chip Properties in Angular PrimeNG. The Chip Component represents entities using labels, icons, and images. Ch
3 min read
Angular PrimeNG Panel Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know the different properties of the Panel component in Angular PrimeNG. P
4 min read