### Basic FileUpload Example Source: https://primeng.dev/fileupload Demonstrates a basic file upload setup with a choose button and upload functionality. Requires no special properties to be set. ```html ``` -------------------------------- ### Basic Toolbar Example Source: https://primeng.dev/toolbar A simple toolbar demonstrating the grouping of action buttons. ```html
``` -------------------------------- ### Basic Drawer Example Source: https://primeng.dev/drawer A fundamental example of a slide-in drawer from the edge of the screen. ```html
Header

Content

``` -------------------------------- ### Basic Toolbar Setup Source: https://primeng.dev/toolbar A simple PrimeNG Toolbar implementation. Ensure you have imported the ToolbarModule. ```typescript import { Component } from '@angular/core'; import { ToolbarModule } from 'primeng/toolbar'; @Component({ selector: 'app-toolbar-basic-demo', standalone: true, imports: [ToolbarModule], template: `
` }) export class ToolbarBasicDemoComponent {} ``` -------------------------------- ### Responsive Drawer Example Source: https://primeng.dev/drawer Configures the drawer to be responsive using style classes with responsive utilities. ```html
Header

Content

``` -------------------------------- ### Headless Drawer Example Source: https://primeng.dev/drawer Demonstrates the headless mode of the drawer, allowing full customization of the UI. ```html
Headless Drawer

This is a completely custom drawer interface.

``` -------------------------------- ### Basic InputGroup Example Source: https://primeng.dev/inputgroup Combines an input with addons such as buttons or text labels. ```html
``` -------------------------------- ### Nested Splitter Example Source: https://primeng.dev/splitter Illustrates how to nest Splitter components within each other to create complex layouts. ```html
Panel 1
Nested Panel 1
Nested Panel 2
``` -------------------------------- ### Show Overlay Source: https://primeng.dev/overlay This snippet demonstrates how to display a basic overlay. It serves as a foundational example for using the Overlay API. ```typescript import { Component } from '@angular/core'; @Component({ selector: 'overlay-basic-demo', templateUrl: './overlay-basic-demo.html' }) export class OverlayBasicDemo {} ``` -------------------------------- ### Basic InputOtp Configuration Source: https://primeng.dev/inputotp A basic setup for InputOtp where each digit of the OTP is entered into a separate field. ```html ``` -------------------------------- ### Basic InputOtp Configuration Source: https://primeng.dev/inputotp This snippet shows the basic setup for the InputOtp component in Angular. It requires importing the InputOtpModule. ```typescript import { Component } from '@angular/core'; @Component({ selector: 'inputotp-basic-demo', templateUrl: './inputotp-basic-demo.html' }) export class InputOtpBasicDemo {} ``` ```html

Value: {{val}}

``` -------------------------------- ### Sample UI with InputOtp Templating Source: https://primeng.dev/inputotp A sample UI implementation showcasing templating for InputOtp, including additional elements like buttons and text for a complete user flow. ```html

Authenticate Your Account

Please enter the code sent to your phone.

``` -------------------------------- ### InputNumber Localization Examples Source: https://primeng.dev/inputnumber Demonstrates InputNumber's locale-aware formatting for different regions. ```typescript import {Component} from '@angular/core'; @Component({ selector: 'inputnumber-locale-demo', templateUrl: './inputnumber-locale-demo.html' }) export class InputNumberLocaleDemo { public value1: number; public value2: number; public value3: number; public value4: number; } ``` ```html
User Locale
United States Locale
German Locale
Indian Locale
``` -------------------------------- ### Toggleable Fieldset Example Source: https://primeng.dev/fieldset Content of the fieldset can be expanded and collapsed using the toggleable property. ```html

Design Service$120.00

Hosting$30.00

Total$150.00

``` -------------------------------- ### Basic ConfirmDialog Usage Source: https://primeng.dev/confirmdialog Demonstrates the basic setup of ConfirmDialog using the p-confirmdialog tag and ConfirmationService. An instance of ConfirmationService is required to display the dialog by calling the confirm method. ```typescript import { Component } from '@angular/core'; import { ConfirmEventType, ConfirmationService, MessageService } from 'primeng/api'; @Component({ selector: 'app-confirmdialog-basic-demo', templateUrl: './confirmdialog-basic-demo.html', providers: [ConfirmationService, MessageService] }) export class ConfirmDialogBasicDemo { constructor(private confirmationService: ConfirmationService) {} show() { this.confirmationService.confirm({ message: 'Are you sure that you want to proceed?', header: 'Confirmation', icon: 'pi pi-exclamation-triangle', accept: () => { //action to execute when user confirms }, reject: () => { //action to execute when user rejects } }); } } ``` ```html ``` -------------------------------- ### Basic Fieldset Example Source: https://primeng.dev/fieldset A simple Fieldset is created with a legend property and content as children. ```html

Design Service$120.00

Hosting$30.00

Total$150.00

``` -------------------------------- ### Basic Chip Example Source: https://primeng.dev/chip A basic chip displaying information with an optional remove action. ```html ``` -------------------------------- ### Basic Dock Configuration Source: https://primeng.dev/dock This snippet demonstrates the basic setup of a PrimeVue Dock component, including its model for defining items. Ensure the Dock component and its necessary CSS are imported. ```javascript import Dock from 'primevue/dock'; import { ref } from 'vue'; const items = ref([ { label: 'Search', icon: '/images/dock/search.svg', command: () => { // Action for search } }, { label: 'Cloud', icon: '/images/dock/cloud.svg', command: () => { // Action for cloud } }, { label: 'Support', icon: '/images/dock/support.svg', command: () => { // Action for support } }, { label: 'Terminal', icon: '/images/dock/terminal.svg', command: () => { // Action for terminal } } ]); ``` ```html ``` -------------------------------- ### Dock with Custom Template Source: https://primeng.dev/dock This example shows how to use a template to customize the appearance of individual items within the Dock. The 'item' slot provides access to the item data and its index. ```html ``` -------------------------------- ### Toolbar with Icons Only Source: https://primeng.dev/toolbar A PrimeNG Toolbar example using only icons for actions. Ensure ToolbarModule is imported. ```typescript import { Component } from '@angular/core'; import { ToolbarModule } from 'primeng/toolbar'; @Component({ selector: 'app-toolbar-icons-demo', standalone: true, imports: [ToolbarModule], template: `
` }) export class ToolbarIconsDemoComponent {} ``` -------------------------------- ### Horizontal Timeline Example Source: https://primeng.dev/timeline Demonstrates how to change the Timeline orientation to horizontal using the 'layout' property. ```html
{{event.year}}
{{event.data}}
``` ```typescript export class TimelineDemo { events: any[]; ngOnInit() { this.events = [ {year: 2020, data: 'Updates', icon: 'pi pi-check'}, {year: 2021, data: 'Our গর্ব', icon: 'pi pi-cog'}, {year: 2022, data: 'New Features', icon: 'pi pi-user'}, {year: 2023, data: 'New Releases', icon: 'pi pi-server'} ]; } } ``` -------------------------------- ### Listbox Basic Usage Source: https://primeng.dev/listbox Demonstrates the basic setup for a Listbox component, allowing single or multiple selections from a list of options. ```html
``` ```typescript interface City { name: string; code: string; } @Component({ selector: 'listbox-basic-demo', templateUrl: './listbox-basic-demo.html', standalone: true, imports: [CommonModule, ListboxModule, FormsModule] }) export class ListboxBasicDemo { cities: City[] | undefined; selectedCity: City | undefined; ngOnInit() { this.cities = [ { name: 'New York', code: 'NY' }, { name: 'Rome', code: 'RM' }, { name: 'London', code: 'LDN' }, { name: 'Istanbul', code: 'IST' }, { name: 'Paris', code: 'PRS' } ]; } } ``` -------------------------------- ### Basic Timeline Example Source: https://primeng.dev/timeline Demonstrates the fundamental usage of the Timeline component with a collection of events and a content template for event representation. ```html

{{event.status}}

{{event.date}}
``` ```typescript export class TimelineDemo { events: any[]; ngOnInit() { this.events = [ {status: 'Ordered', date: '15/10/2020', icon: 'check-square', color: '#9C8BCD', image: 'resource/images/logo.png'}, {status: 'Processing', date: '10/10/2020', icon: 'arrow-right', color: '#67C7FF'}, {status: 'Shipped', date: '15/10/2020', icon: 'money-bill-transfer', color: '#9BDD7C'}, {status: 'Delivered', date: '25/10/2020', icon: 'check', color: '#F9A8A8'} ]; } } ``` -------------------------------- ### Basic Splitter Source: https://primeng.dev/splitter A fundamental example of the Splitter component dividing a layout into two resizable panels. ```html
Panel 1
Panel 2
``` -------------------------------- ### Controlled Fieldset Example Source: https://primeng.dev/fieldset The collapsed property with two-way binding controls the open state programmatically. ```html

Design Service$120.00

Hosting$30.00

Total$150.00

``` -------------------------------- ### Basic Organization Chart Setup Source: https://primeng.dev/organizationchart Defines the basic structure and data for an Organization Chart component. Requires importing the OrganizationChartModule. ```typescript import { Component } from '@angular/core'; @Component({ selector: 'organizationchart-basicdemo', templateUrl: './organizationchart-basicdemo.html' }) export class OrganizationChartBasicDemo { data: any; constructor() { this.data = [ { label: 'Root', expanded: true, children: [ { label: 'Node 1', children: [ { label: 'Node 1.1' }, { label: 'Node 1.2' } ] }, { label: 'Node 2' } ] } ]; } } ``` -------------------------------- ### Basic Carousel Setup - PrimeNG Source: https://primeng.dev/carousel Demonstrates the basic composition of a PrimeNG Carousel using native scroll-snap. Requires root, content, items, navigation, and indicator sub-components. ```html ``` -------------------------------- ### Basic Divider Example Source: https://primeng.dev/divider A simple horizontal divider placed between content elements to create separation. ```html

Subtotal$89.00

Shipping$5.99

Total$94.99

``` -------------------------------- ### Drawer with Custom Templates Source: https://primeng.dev/drawer Illustrates how to customize the header, content, and footer of the drawer using templates. ```html
Custom Header

This is custom content for the drawer.

``` -------------------------------- ### InputTags with Custom Placeholder Source: https://primeng.dev/inputtags Configure a custom placeholder for the InputTags component to guide user input. ```html ``` -------------------------------- ### Basic Menubar Setup Source: https://primeng.dev/menubar This snippet shows the basic structure for creating a PrimeNG Menubar component in an Angular application. It requires importing the MenubarModule. ```typescript import { Component } from '@angular/core'; import { MenubarModule } from 'primeng/menubar'; @Component({ selector: 'app-menubar-basic', standalone: true, imports: [MenubarModule], template: `` }) export class MenubarBasicDemo { items: MenuItem[] = [ { label: 'New', icon: 'pi pi-plus' }, { label: 'Open', icon: 'pi pi-folder-open' }, { label: 'Save', icon: 'pi pi-save' } ]; } ```