Dock is a navigation component consisting of menuitems.
+
+import Dock from 'primevue/dock';
+
+
+
+ Dock is a navigation component consisting of menuitems. It has a collection of additional options defined by the model property.
+ +
+<Dock :model="items" />
+
+
+
+
+ export default {
+ data() {
+ return {
+ items: [
+ {
+ label: 'Finder',
+ icon: () => <img alt="Finder" src="demo/images/dock/finder.svg" style="width: 100%" />
+ },
+ {
+ label: 'App Store',
+ icon: () => <img alt="App Store" src="demo/images/dock/appstore.svg" style="width: 100%" />
+ },
+ {
+ label: 'Photos',
+ icon: () => <img alt="Photos" src="demo/images/dock/photos.svg" style="width: 100%" />
+ },
+ {
+ label: 'Trash',
+ icon: () => <img alt="trash" src="demo/images/dock/trash.png" style="width: 100%" />
+ }
+ ]
+ }
+ }
+ }
+
+
+
+
+ Dock uses the common MenuModel API to define the items, visit
Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
model | +object | +null | +MenuModel instance to define the action items. | +
position | +string | +bottom | +Position of element. Valid values are 'bottom', 'top', 'left' and 'right'. | +
class | +string | +null | +Style class of the element. | +
style | +object | +null | +Inline style of the element. | +
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-dock | +Container element. | +
p-dock-list | +List of items. | +
p-dock-item | +Each items in list. | +
Name | +Parameters | +
---|---|
item | +item: Custom content for item | +
None.
+ +