Dock is a navigation component consisting of menuitems.

import Dock from 'primevue/dock';

Menu requires a collection of menuitems as its model. Default location is bottom and other sides are also available when defined with the position property.

<Dock :model="items" :position="position">
    <template #icon="{ item }">
        <img :alt="item.label" :src="item.icon" style="width: 100%" />

A sample macOS implementation using various components.

<Dock :model="items">
    <template #item="{ item }">
        <a"item.label" href="#" class="p-dock-link" @click="onDockItemClick($event, item)">
            <img :alt="item.label" :src="item.icon" style="width: 100%" />

Following is the list of structural style classes, for theming classes visit theming page.

p-dockContainer element.
p-dock-list-containerContainer of the list.
p-dock-listList of items.
p-dock-itemEach items in list.
p-menuitem-contentContent of menuitem.
p-dock-linkLink of the menuitem.
p-dock-iconIcon of a menuitem.

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 menuitem role with aria-label referring to the label of the item and aria-disabled defined if the item is disabled.

Keyboard Support

tabMoves focus to the first menuitem.
enterActivates the focused menuitem.
spaceActivates the focused menuitem.
down arrowMoves focus to the next menuitem in vertical layout.
up arrowMoves focus to the previous menuitem in vertical layout.
right arrowMoves focus to the next menuitem in horizontal layout.
left arrowMoves focus to the previous menuitem in horizontal layout.
homeMoves focus to the first menuitem.
endMoves focus to the last menuitem.