Dock

Dock is a navigation component consisting of menuitems.


import Dock from 'primevue/dock';

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


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

A sample desktop demo using various components.


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

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

KeyFunction
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.