📄 primeng/dock

File: dock.md | Updated: 11/15/2025

Source: https://primeng.org/dock

PassThrough Attributes just landed ✅Learn More

  • SearchK

  • Primary

    Surface

    PresetsAuraMaterialLaraNora

    Ripple

    RTL

  • v20

  • FEATURES

  • API

  • THEMING

  • PASSTHROUGH

Dock

Dock is a navigation component consisting of menuitems.

Import #

import { DockModule } from 'primeng/dock';

Basic #

Dock requires a collection of menuitems as its model. Default location is bottom and other sides are also available when defined with the position property. Content of the dock component is defined by item template.

Bottom

Top

Left

Right

  • Finder

  • App Store

  • Photos

  • Trash

<p-dock [model]="items" [position]="position"> <ng-template #item let-item> <img [pTooltip]="item.label" tooltipPosition="top" [src]="item.icon" [alt]="item.label" width="100%" /> </ng-template> </p-dock>

Advanced #

A mock desktop UI implemented with various components in addition to Dock.

  • Finder

  • File

    • New

      • Bookmark

      • Video

    • Delete

    • Export

  • Edit

    • Left

    • Right

    • Center

    • Justify

  • Users

    • New

    • Delete

    • Search

      • Filter

        • Print
      • List

  • Events

    • Edit

      • Save

      • Delete

    • Archieve

      • Remove
  • Quit

Fri 13:07

  • Finder

  • Terminal

  • App Store

  • Safari

  • Photos

  • GitHub

  • Trash

<p-menubar [model]="menubarItems"> <ng-template #start> <i class="pi pi-apple px-2"></i> </ng-template> <ng-template #end> <i class="pi pi-video px-2"></i> <i class="pi pi-wifi px-2"></i> <i class="pi pi-volume-up px-2"></i> <span class="px-2">Fri 13:07</span> <i class="pi pi-search px-2"></i> <i class="pi pi-bars px-2"></i> </ng-template> </p-menubar> <div class="dock-window"> <p-dock [model]="dockItems" position="bottom"> <ng-template #item let-item> <a [pTooltip]="item.label" tooltipPosition="top" class="p-dock-item-link"> <img [alt]="item.label" [src]="item.icon" style="width: 100%" /> </a> </ng-template> </p-dock>

    <p-toast position="top-center" key="tc" />

    <p-dialog
        [(visible)]="displayFinder"
        [breakpoints]="{ '960px': '50vw' }"
        [style]="{ width: '30vw', height: '18rem' }"
        [draggable]="false"
        [resizable]="false"
        header="Finder"
    >
        <p-tree [value]="nodes" />
    </p-dialog>

    <p-dialog
        [maximizable]="true"
        [(visible)]="displayTerminal"
        [breakpoints]="{ '960px': '50vw' }"
        [style]="{ width: '30vw' }"
        [draggable]="false"
        [resizable]="false"
        header="Terminal"
    >
        <p-terminal welcomeMessage="Welcome to PrimeNG (cmd: 'date', 'greet {0}', 'random')" prompt="primeng $" />
    </p-dialog>

    <p-galleria
        [(value)]="images"
        [showThumbnails]="false"
        [showThumbnailNavigators]="false"
        [showItemNavigators]="true"
        [(visible)]="displayGalleria"
        [circular]="true"
        [responsiveOptions]="responsiveOptions"
        [circular]="true"
        [fullScreen]="true"
        [containerStyle]="{ width: '400px' }"
    >
        <ng-template #item let-item>
            <img [src]="item.itemImageSrc" style="width: 100%; display: block;" />
        </ng-template>
    </p-galleria>

Accessibility #

Screen Reader

Dock component uses the menu role with the aria-orientation and the value to describe the menu can either be provided with aria-labelledby or aria-label props. Each list item has a presentation role whereas anchor elements have a menuitem role with aria-label referring to the label of the item and aria-disabled defined if the item is disabled.

Keyboard Support

| Key | Function | | --- | --- | | tab | Add focus to the first item if focus moves in to the menu. If the focus is already within the menu, focus moves to the next focusable item in the page tab sequence. | | shift + tab | Add focus to the last item if focus moves in to the menu. If the focus is already within the menu, focus moves to the previous focusable item in the page tab sequence. | | enter | Activates the focused menuitem. | | space | Activates the focused menuitem. | | down arrow | Moves focus to the next menuitem in vertical layout. | | up arrow | Moves focus to the previous menuitem in vertical layout. | | home | Moves focus to the first menuitem in horizontal layout. | | end | Moves focus to the last menuitem in horizontal layout. |

  • Import

  • Basic

  • Advanced

  • Accessibility

Figma UI Kit

The official Figma UI Kit for Prime UI libraries, the essential resource for designing with PrimeOne components.

Learn More

PrimeNG 20.3.0 by PrimeTek