@primevue/mcp 4.5.5 → 5.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/LICENSE.md +45 -21
  2. package/README.md +48 -250
  3. package/data/components.json +47269 -0
  4. package/data/llms/components/accordion.md +629 -0
  5. package/data/llms/components/animateonscroll.md +165 -0
  6. package/data/llms/components/autocomplete.md +995 -0
  7. package/data/llms/components/avatar.md +264 -0
  8. package/data/llms/components/badge.md +200 -0
  9. package/data/llms/components/blockui.md +99 -0
  10. package/data/llms/components/breadcrumb.md +269 -0
  11. package/data/llms/components/button.md +902 -0
  12. package/data/llms/components/card.md +209 -0
  13. package/data/llms/components/carousel.md +506 -0
  14. package/data/llms/components/cascadeselect.md +1207 -0
  15. package/data/llms/components/chart.md +1022 -0
  16. package/data/llms/components/checkbox.md +401 -0
  17. package/data/llms/components/chip.md +206 -0
  18. package/data/llms/components/colorpicker.md +213 -0
  19. package/data/llms/components/commandmenu.md +660 -0
  20. package/data/llms/components/compare.md +407 -0
  21. package/data/llms/components/confirmdialog.md +343 -0
  22. package/data/llms/components/confirmpopup.md +252 -0
  23. package/data/llms/components/contextmenu.md +522 -0
  24. package/data/llms/components/datatable.md +5266 -0
  25. package/data/llms/components/dataview.md +569 -0
  26. package/data/llms/components/datepicker.md +964 -0
  27. package/data/llms/components/deferredcontent.md +96 -0
  28. package/data/llms/components/dialog.md +702 -0
  29. package/data/llms/components/divider.md +152 -0
  30. package/data/llms/components/dock.md +488 -0
  31. package/data/llms/components/drawer.md +469 -0
  32. package/data/llms/components/dynamicdialog.md +214 -0
  33. package/data/llms/components/editor.md +205 -0
  34. package/data/llms/components/fieldset.md +253 -0
  35. package/data/llms/components/fileupload.md +459 -0
  36. package/data/llms/components/floatlabel.md +144 -0
  37. package/data/llms/components/fluid.md +104 -0
  38. package/data/llms/components/focustrap.md +59 -0
  39. package/data/llms/components/forms.md +344 -0
  40. package/data/llms/components/galleria.md +1119 -0
  41. package/data/llms/components/gallery.md +1003 -0
  42. package/data/llms/components/iconfield.md +283 -0
  43. package/data/llms/components/iftalabel.md +96 -0
  44. package/data/llms/components/image.md +179 -0
  45. package/data/llms/components/imagecompare.md +108 -0
  46. package/data/llms/components/inplace.md +183 -0
  47. package/data/llms/components/inputcolor.md +869 -0
  48. package/data/llms/components/inputgroup.md +419 -0
  49. package/data/llms/components/inputmask.md +345 -0
  50. package/data/llms/components/inputnumber.md +551 -0
  51. package/data/llms/components/inputotp.md +345 -0
  52. package/data/llms/components/inputpassword.md +738 -0
  53. package/data/llms/components/inputtags.md +432 -0
  54. package/data/llms/components/inputtext.md +569 -0
  55. package/data/llms/components/installation.md +1 -0
  56. package/data/llms/components/keyfilter.md +116 -0
  57. package/data/llms/components/knob.md +318 -0
  58. package/data/llms/components/label.md +151 -0
  59. package/data/llms/components/laravel.md +53 -0
  60. package/data/llms/components/listbox.md +636 -0
  61. package/data/llms/components/mask.md +203 -0
  62. package/data/llms/components/mcp.md +39 -0
  63. package/data/llms/components/megamenu.md +563 -0
  64. package/data/llms/components/menu.md +651 -0
  65. package/data/llms/components/menubar.md +446 -0
  66. package/data/llms/components/message.md +497 -0
  67. package/data/llms/components/metergroup.md +281 -0
  68. package/data/llms/components/multiselect.md +752 -0
  69. package/data/llms/components/orderlist.md +224 -0
  70. package/data/llms/components/organizationchart.md +418 -0
  71. package/data/llms/components/paginator.md +221 -0
  72. package/data/llms/components/panel.md +321 -0
  73. package/data/llms/components/panelmenu.md +703 -0
  74. package/data/llms/components/password.md +657 -0
  75. package/data/llms/components/picklist.md +286 -0
  76. package/data/llms/components/popover.md +145 -0
  77. package/data/llms/components/progressbar.md +242 -0
  78. package/data/llms/components/progressspinner.md +104 -0
  79. package/data/llms/components/radiobutton.md +427 -0
  80. package/data/llms/components/rating.md +312 -0
  81. package/data/llms/components/ripple.md +91 -0
  82. package/data/llms/components/scrollarea.md +700 -0
  83. package/data/llms/components/scrollpanel.md +131 -0
  84. package/data/llms/components/scrolltop.md +87 -0
  85. package/data/llms/components/select.md +1251 -0
  86. package/data/llms/components/selectbutton.md +268 -0
  87. package/data/llms/components/sidebar.md +2232 -0
  88. package/data/llms/components/skeleton.md +302 -0
  89. package/data/llms/components/slider.md +416 -0
  90. package/data/llms/components/speeddial.md +402 -0
  91. package/data/llms/components/splitbutton.md +840 -0
  92. package/data/llms/components/splitter.md +447 -0
  93. package/data/llms/components/stepper.md +551 -0
  94. package/data/llms/components/styleclass.md +226 -0
  95. package/data/llms/components/tabs.md +609 -0
  96. package/data/llms/components/tag.md +178 -0
  97. package/data/llms/components/terminal.md +123 -0
  98. package/data/llms/components/textarea.md +519 -0
  99. package/data/llms/components/tieredmenu.md +578 -0
  100. package/data/llms/components/timeline.md +494 -0
  101. package/data/llms/components/toast.md +472 -0
  102. package/data/llms/components/togglebutton.md +276 -0
  103. package/data/llms/components/toggleswitch.md +271 -0
  104. package/data/llms/components/toolbar.md +140 -0
  105. package/data/llms/components/tooltip.md +160 -0
  106. package/data/llms/components/tree.md +1076 -0
  107. package/data/llms/components/treeselect.md +660 -0
  108. package/data/llms/components/treetable.md +2493 -0
  109. package/data/llms/components/virtualscroller.md +265 -0
  110. package/data/llms/guides/autoimport.md +28 -0
  111. package/data/llms/guides/cdn.md +72 -0
  112. package/data/llms/guides/configuration.md +158 -0
  113. package/data/llms/guides/customicons.md +67 -0
  114. package/data/llms/guides/guides/accessibility.md +27 -0
  115. package/data/llms/guides/guides/animations.md +119 -0
  116. package/data/llms/guides/guides/rtl.md +7 -0
  117. package/data/llms/guides/icons.md +136 -0
  118. package/data/llms/guides/installation.md +3 -0
  119. package/data/llms/guides/laravel.md +66 -0
  120. package/data/llms/guides/llms.md +15 -0
  121. package/data/llms/guides/mcp.md +104 -0
  122. package/data/llms/guides/migration/v4.md +15 -0
  123. package/data/llms/guides/migration/v5.md +15 -0
  124. package/data/llms/guides/nuxt.md +141 -0
  125. package/data/llms/guides/passthrough.md +137 -0
  126. package/data/llms/guides/primeclt.md +43 -0
  127. package/data/llms/guides/tailwind.md +151 -0
  128. package/data/llms/guides/theming/styled.md +497 -0
  129. package/data/llms/guides/theming/unstyled.md +57 -0
  130. package/data/llms/guides/uikit.md +3 -0
  131. package/data/llms/guides/vite.md +90 -0
  132. package/data/llms/llms-full.txt +54465 -0
  133. package/data/llms/llms.txt +132 -0
  134. package/data/llms/pages/accessibility.md +27 -0
  135. package/data/llms/pages/animations.md +119 -0
  136. package/data/llms/pages/autoimport.md +28 -0
  137. package/data/llms/pages/cdn.md +72 -0
  138. package/data/llms/pages/configuration.md +158 -0
  139. package/data/llms/pages/contribution.md +31 -0
  140. package/data/llms/pages/customicons.md +67 -0
  141. package/data/llms/pages/designer.md +79 -0
  142. package/data/llms/pages/dynamicimports.md +7 -0
  143. package/data/llms/pages/forms.md +63 -0
  144. package/data/llms/pages/guides/accessibility.md +27 -0
  145. package/data/llms/pages/guides/animations.md +119 -0
  146. package/data/llms/pages/guides/rtl.md +7 -0
  147. package/data/llms/pages/icons.md +136 -0
  148. package/data/llms/pages/installation.md +3 -0
  149. package/data/llms/pages/introduction.md +23 -0
  150. package/data/llms/pages/laravel.md +66 -0
  151. package/data/llms/pages/llms.md +15 -0
  152. package/data/llms/pages/mcp.md +104 -0
  153. package/data/llms/pages/migration/v4.md +15 -0
  154. package/data/llms/pages/migration/v5.md +15 -0
  155. package/data/llms/pages/nuxt.md +141 -0
  156. package/data/llms/pages/passthrough.md +137 -0
  157. package/data/llms/pages/primeclt.md +43 -0
  158. package/data/llms/pages/rtl.md +7 -0
  159. package/data/llms/pages/setup.md +3 -0
  160. package/data/llms/pages/styled.md +497 -0
  161. package/data/llms/pages/tailwind.md +151 -0
  162. package/data/llms/pages/theming/styled.md +497 -0
  163. package/data/llms/pages/theming/unstyled.md +57 -0
  164. package/data/llms/pages/uikit.md +3 -0
  165. package/data/llms/pages/unstyled.md +57 -0
  166. package/data/llms/pages/v4.md +15 -0
  167. package/data/llms/pages/v5.md +15 -0
  168. package/data/llms/pages/vite.md +90 -0
  169. package/data/manifest.json +11117 -0
  170. package/data/mcp-data.json +55940 -0
  171. package/dist/index.d.ts +17 -1
  172. package/dist/index.js +66066 -72541
  173. package/package.json +10 -12
@@ -0,0 +1,446 @@
1
+ # Menubar
2
+
3
+ Menubar is a horizontal menu component.
4
+
5
+ ## Basic
6
+
7
+ Menubar requires nested menuitems as its model .
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <Menubar :model="items" />
13
+ </div>
14
+ </template>
15
+
16
+ <script setup>
17
+ import { ref } from 'vue';
18
+ import Clipboard from '@primeicons/vue/clipboard';
19
+ import Copy from '@primeicons/vue/copy';
20
+ import Download from '@primeicons/vue/download';
21
+ import File from '@primeicons/vue/file';
22
+ import FolderOpen from '@primeicons/vue/folder-open';
23
+ import Replay from '@primeicons/vue/replay';
24
+ import Save from '@primeicons/vue/save';
25
+ import Undo from '@primeicons/vue/undo';
26
+
27
+ const items = ref([
28
+ {
29
+ label: 'File',
30
+ items: [{ label: 'New Document', icon: File }, { label: 'Open', icon: FolderOpen }, { separator: true }, { label: 'Save', icon: Save }, { label: 'Save As…', icon: Download }]
31
+ },
32
+ {
33
+ label: 'Edit',
34
+ items: [{ label: 'Undo', icon: Undo }, { label: 'Redo', icon: Replay }, { separator: true }, { label: 'Cut', icon: Clipboard }, { label: 'Copy', icon: Copy }, { label: 'Paste', icon: File }]
35
+ },
36
+ {
37
+ label: 'View',
38
+ items: [{ label: 'Zoom In' }, { label: 'Zoom Out' }, { label: 'Reset Zoom' }, { separator: true }, { label: 'Full Screen' }]
39
+ },
40
+ {
41
+ label: 'Help',
42
+ items: [{ label: 'Documentation' }, { label: 'Support' }, { separator: true }, { label: 'About' }]
43
+ }
44
+ ]);
45
+ <\/script>
46
+ ```
47
+
48
+ ## Submenus
49
+
50
+ Menuitems with nested items create cascading submenus.
51
+
52
+ ```vue
53
+ <template>
54
+ <div class="flex justify-center">
55
+ <Menubar :model="items" />
56
+ </div>
57
+ </template>
58
+
59
+ <script setup>
60
+ import { ref } from 'vue';
61
+
62
+ const items = ref([
63
+ {
64
+ label: 'File',
65
+ items: [
66
+ { label: 'New File' },
67
+ { label: 'Open File…' },
68
+ {
69
+ label: 'Open Recent',
70
+ items: [
71
+ { label: 'todo.md' },
72
+ { label: 'changelog.md' },
73
+ { label: 'readme.md' },
74
+ {
75
+ label: 'Older',
76
+ items: [{ label: 'release-notes.md' }, { label: 'roadmap.md' }, { label: 'contributing.md' }, { label: 'license.txt' }]
77
+ },
78
+ { separator: true },
79
+ { label: 'Clear Recent' }
80
+ ]
81
+ },
82
+ { separator: true },
83
+ { label: 'Save' },
84
+ { label: 'Save As…' }
85
+ ]
86
+ },
87
+ {
88
+ label: 'View',
89
+ items: [{ label: 'Reload' }, { label: 'Force Reload' }, { separator: true }, { label: 'Toggle DevTools' }]
90
+ }
91
+ ]);
92
+ <\/script>
93
+ ```
94
+
95
+ ## Template
96
+
97
+ Menubar offers item customization with the item template that receives the menuitem instance from the model as a parameter. Additional slots named start and end are provided to embed content before or after the menu.
98
+
99
+ ```vue
100
+ <template>
101
+ <div>
102
+ <Menubar :model="items">
103
+ <template #start>
104
+ <svg width="35" height="40" viewBox="0 0 35 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-8">
105
+ <path
106
+ d="M25.87 18.05L23.16 17.45L25.27 20.46V29.78L32.49 23.76V13.53L29.18 14.73L25.87 18.04V18.05ZM25.27 35.49L29.18 31.58V27.67L25.27 30.98V35.49ZM20.16 17.14H20.03H20.17H20.16ZM30.1 5.19L34.89 4.81L33.08 12.33L24.1 15.67L30.08 5.2L30.1 5.19ZM5.72 14.74L2.41 13.54V23.77L9.63 29.79V20.47L11.74 17.46L9.03 18.06L5.72 14.75V14.74ZM9.63 30.98L5.72 27.67V31.58L9.63 35.49V30.98ZM4.8 5.2L10.78 15.67L1.81 12.33L0 4.81L4.79 5.19L4.8 5.2ZM24.37 21.05V34.59L22.56 37.29L20.46 39.4H14.44L12.34 37.29L10.53 34.59V21.05L12.42 18.23L17.45 26.8L22.48 18.23L24.37 21.05ZM22.85 0L22.57 0.69L17.45 13.08L12.33 0.69L12.05 0H22.85Z"
107
+ fill="var(--p-primary-color)"
108
+ />
109
+ <path
110
+ d="M30.69 4.21L24.37 4.81L22.57 0.69L22.86 0H26.48L30.69 4.21ZM23.75 5.67L22.66 3.08L18.05 14.24V17.14H19.7H20.03H20.16H20.2L24.1 15.7L30.11 5.19L23.75 5.67ZM4.21002 4.21L10.53 4.81L12.33 0.69L12.05 0H8.43002L4.22002 4.21H4.21002ZM21.9 17.4L20.6 18.2H14.3L13 17.4L12.4 18.2L12.42 18.23L17.45 26.8L22.48 18.23L22.5 18.2L21.9 17.4ZM4.79002 5.19L10.8 15.7L14.7 17.14H14.74H15.2H16.85V14.24L12.24 3.09L11.15 5.68L4.79002 5.2V5.19Z"
111
+ fill="var(--p-text-color)"
112
+ />
113
+ </svg>
114
+ </template>
115
+ <template #item="{ item, props, hasSubmenu, root }">
116
+ <a v-ripple class="flex items-center px-3 py-2 cursor-pointer gap-2" v-bind="props.action">
117
+ <span class="text-sm">{{ item.label }}</span>
118
+ <Badge v-if="item.badge" :class="root ? '' : 'ms-auto'" :value="item.badge" />
119
+ <span v-if="item.shortcut" class="ms-auto border border-surface rounded-sm bg-emphasis text-muted-color text-xs p-1">{{ item.shortcut }}</span>
120
+ <component :is="root ? 'AngleDown' : 'AngleRight'" v-if="hasSubmenu" class="ms-auto" />
121
+ </a>
122
+ </template>
123
+ <template #end>
124
+ <div class="flex items-center gap-2">
125
+ <InputText placeholder="Search" type="text" class="w-36" />
126
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
127
+ </div>
128
+ </template>
129
+ </Menubar>
130
+ </div>
131
+ </template>
132
+
133
+ <script setup>
134
+ import { ref } from "vue";
135
+ import AngleDown from '@primeicons/vue/angle-down';
136
+ import AngleRight from '@primeicons/vue/angle-right';
137
+ import Bolt from '@primeicons/vue/bolt';
138
+ import Home from '@primeicons/vue/home';
139
+ import Pencil from '@primeicons/vue/pencil';
140
+ import Search from '@primeicons/vue/search';
141
+ import Server from '@primeicons/vue/server';
142
+
143
+ const items = ref([
144
+ {
145
+ label: 'Home',
146
+ icon: Home
147
+ },
148
+ {
149
+ label: 'Projects',
150
+ icon: Search,
151
+ badge: 3,
152
+ items: [
153
+ {
154
+ label: 'Core',
155
+ icon: Bolt,
156
+ shortcut: '⌘+S'
157
+ },
158
+ {
159
+ label: 'Blocks',
160
+ icon: Server,
161
+ shortcut: '⌘+B'
162
+ },
163
+ {
164
+ separator: true
165
+ },
166
+ {
167
+ label: 'UI Kit',
168
+ icon: Pencil,
169
+ shortcut: '⌘+U'
170
+ }
171
+ ]
172
+ }
173
+ ]);
174
+ <\/script>
175
+ ```
176
+
177
+ ## Command
178
+
179
+ The command property defines the callback to run when an item is activated by click or a key event.
180
+
181
+ ```vue
182
+ <template>
183
+ <div>
184
+ <Menubar :model="items" />
185
+ <Toast />
186
+ </div>
187
+ </template>
188
+
189
+ <script setup>
190
+ import { ref } from "vue";
191
+ import { useToast } from "primevue/usetoast";
192
+ import Cloud from '@primeicons/vue/cloud';
193
+ import CloudDownload from '@primeicons/vue/cloud-download';
194
+ import CloudUpload from '@primeicons/vue/cloud-upload';
195
+ import File from '@primeicons/vue/file';
196
+ import Plus from '@primeicons/vue/plus';
197
+ import Print from '@primeicons/vue/print';
198
+ import Search from '@primeicons/vue/search';
199
+
200
+ const toast = useToast();
201
+
202
+ const items = ref([
203
+ {
204
+ label: 'File',
205
+ icon: File,
206
+ items: [
207
+ {
208
+ label: 'New',
209
+ icon: Plus,
210
+ command: () => {
211
+ toast.add({ severity: 'success', summary: 'Success', detail: 'File created', life: 3000 });
212
+ }
213
+ },
214
+ {
215
+ label: 'Print',
216
+ icon: Print,
217
+ command: () => {
218
+ toast.add({ severity: 'error', summary: 'Error', detail: 'No printer connected', life: 3000 });
219
+ }
220
+ }
221
+ ]
222
+ },
223
+ {
224
+ label: 'Search',
225
+ icon: Search,
226
+ command: () => {
227
+ toast.add({ severity: 'warn', summary: 'Search Results', detail: 'No results found', life: 3000 });
228
+ }
229
+ },
230
+ {
231
+ separator: true
232
+ },
233
+ {
234
+ label: 'Sync',
235
+ icon: Cloud,
236
+ items: [
237
+ {
238
+ label: 'Import',
239
+ icon: CloudDownload,
240
+ command: () => {
241
+ toast.add({ severity: 'info', summary: 'Downloads', detail: 'Downloaded from cloud', life: 3000 });
242
+ }
243
+ },
244
+ {
245
+ label: 'Export',
246
+ icon: CloudUpload,
247
+ command: () => {
248
+ toast.add({ severity: 'info', summary: 'Shared', detail: 'Exported to cloud', life: 3000 });
249
+ }
250
+ }
251
+ ]
252
+ }
253
+ ]);
254
+ <\/script>
255
+ ```
256
+
257
+ ## Router
258
+
259
+ Menu items support navigation via router-link, programmatic routing using commands, or external URLs.
260
+
261
+ ```vue
262
+ <template>
263
+ <div>
264
+ <Menubar :model="items">
265
+ <template #item="{ item, icon, label, props, hasSubmenu }">
266
+ <router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
267
+ <a v-ripple :href="href" v-bind="props.action" @click="navigate">
268
+ <component :is="icon" />
269
+ <span class="text-sm">{{ label }}</span>
270
+ </a>
271
+ </router-link>
272
+ <a v-else v-ripple :href="item.url" :target="item.target" v-bind="props.action">
273
+ <component :is="icon" />
274
+ <span class="text-sm">{{ label }}</span>
275
+ <AngleDown v-if="hasSubmenu" />
276
+ </a>
277
+ </template>
278
+ </Menubar>
279
+ </div>
280
+ </template>
281
+
282
+ <script setup>
283
+ import { ref } from "vue";
284
+ import { useRouter } from 'vue-router';
285
+ import AngleDown from '@primeicons/vue/angle-down';
286
+ import Home from '@primeicons/vue/home';
287
+ import Link from '@primeicons/vue/link';
288
+ import Palette from '@primeicons/vue/palette';
289
+
290
+ const router = useRouter();
291
+
292
+ const items = ref([
293
+ {
294
+ label: 'Router',
295
+ icon: Palette,
296
+ items: [
297
+ {
298
+ label: 'Installation',
299
+ route: '/installation'
300
+ },
301
+ {
302
+ label: 'Configuration',
303
+ route: '/configuration'
304
+ }
305
+ ]
306
+ },
307
+ {
308
+ label: 'Programmatic',
309
+ icon: Link,
310
+ command: () => {
311
+ router.push('/installation');
312
+ }
313
+ },
314
+ {
315
+ label: 'External',
316
+ icon: Home,
317
+ items: [
318
+ {
319
+ label: 'Vue.js',
320
+ url: 'https://vuejs.org/'
321
+ },
322
+ {
323
+ label: 'Vite.js',
324
+ url: 'https://vitejs.dev/'
325
+ }
326
+ ]
327
+ }
328
+ ]);
329
+ <\/script>
330
+ ```
331
+
332
+ ## Advanced
333
+
334
+ Menubar is a simple horizontal navigation component, for advanced use cases consider Marketing and Application NavBars in PrimeBlocks or templates with horizontal menus in application templates.
335
+
336
+ ## Accessibility
337
+
338
+ Screen Reader Menubar component uses the menubar role 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. A submenu within a MenuBar uses the menu role with an aria-labelledby defined as the id of the submenu root menuitem label. In addition, menuitems that open a submenu have aria-haspopup , aria-expanded and aria-controls to define the relation between the item and the submenu. In mobile viewports, a menu icon appears with a button role along with aria-haspopup , aria-expanded and aria-controls to manage the relation between the overlay menubar and the button. The value to describe the button can be defined aria-label or aria-labelledby specified using buttonProps , by default navigation key of the aria property from the locale API as the aria-label . 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 first 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 If menuitem has a submenu, toggles the visibility of the submenu otherwise activates the menuitem and closes all open overlays. space If menuitem has a submenu, toggles the visibility of the submenu otherwise activates the menuitem and closes all open overlays. escape If focus is inside a popup submenu, closes the submenu and moves focus to the root item of the closed submenu. down arrow If focus is on a root element, open a submenu and moves focus to the first element in the submenu otherwise moves focus to the next menuitem within the submenu. up arrow If focus is on a root element, opens a submenu and moves focus to the last element in the submenu otherwise moves focus to the previous menuitem within the submenu. right arrow If focus is on a root element, moves focus to the next menuitem otherwise opens a submenu if there is one available and moves focus to the first item. left arrow If focus is on a root element, moves focus to the previous menuitem otherwise closes a submenu and moves focus to the root item of the closed submenu. home Moves focus to the first menuitem within the submenu. end Moves focus to the last menuitem within the submenu. any printable character Moves focus to the menuitem whose label starts with the characters being typed.
339
+
340
+ ## Menubar API
341
+
342
+ ### Props
343
+
344
+ | Name |Type |Default |Description |
345
+ | --- | --- | --- | --- |
346
+ | model | MenuItem[] | - | An array of menuitems. |
347
+ | breakpoint | string | 960px | The breakpoint to define the maximum width boundary. |
348
+ | buttonProps | ButtonHTMLAttributes | - | Used to pass all properties of the HTMLButtonElement to the menu button. |
349
+ | ariaLabel | string | - | Defines a string value that labels an interactive element. |
350
+ | ariaLabelledby | string | - | Identifier of the underlying input element. |
351
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
352
+ | pt | PassThrough<MenubarPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
353
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
354
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
355
+
356
+ ### Pass Through Options
357
+
358
+ | Name |Type |Description |
359
+ | --- | --- | --- |
360
+ | root | MenubarPassThroughOptionType | Used to pass attributes to the root's DOM element. |
361
+ | rootList | MenubarPassThroughOptionType | Used to pass attributes to the root list's DOM element. |
362
+ | item | MenubarPassThroughOptionType | Used to pass attributes to the item's DOM element. |
363
+ | itemContent | MenubarPassThroughOptionType | Used to pass attributes to the item content's DOM element. |
364
+ | itemLink | MenubarPassThroughOptionType | Used to pass attributes to the item link's DOM element. |
365
+ | itemIcon | MenubarPassThroughOptionType | Used to pass attributes to the item icon's DOM element. |
366
+ | itemLabel | MenubarPassThroughOptionType | Used to pass attributes to the item label's DOM element. |
367
+ | submenuIcon | MenubarPassThroughOptionType | Used to pass attributes to the submenu icon's DOM element. |
368
+ | separator | MenubarPassThroughOptionType | Used to pass attributes to the separator's DOM element. |
369
+ | button | MenubarPassThroughOptionType | Used to pass attributes to the mobile menu button's DOM element. |
370
+ | buttonIcon | MenubarPassThroughOptionType | Used to pass attributes to the mobile menu button icon's DOM element. |
371
+ | submenu | MenubarPassThroughOptionType | Used to pass attributes to the submenu's DOM element. |
372
+ | start | MenubarPassThroughOptionType | Used to pass attributes to the start of the component. |
373
+ | end | MenubarPassThroughOptionType | Used to pass attributes to the end of the component. |
374
+ | hooks | any | Used to manage all lifecycle hooks. |
375
+
376
+ ### Theming
377
+
378
+ ### CSS Classes
379
+
380
+ | Class |Description |
381
+ | --- | --- |
382
+ | p-menubar | Class name of the root element |
383
+ | p-menubar-start | Class name of the start element |
384
+ | p-menubar-button | Class name of the button element |
385
+ | p-menubar-root-list | Class name of the root list element |
386
+ | p-menubar-item | Class name of the item element |
387
+ | p-menubar-item-content | Class name of the item content element |
388
+ | p-menubar-item-link | Class name of the item link element |
389
+ | p-menubar-item-icon | Class name of the item icon element |
390
+ | p-menubar-item-label | Class name of the item label element |
391
+ | p-menubar-submenu-icon | Class name of the submenu icon element |
392
+ | p-menubar-submenu | Class name of the submenu element |
393
+ | p-menubar-separator | Class name of the separator element |
394
+ | p-menubar-end | Class name of the end element |
395
+
396
+ ### Design Tokens
397
+
398
+ | Token |CSS Variable |Description |
399
+ | --- | --- | --- |
400
+ | menubar.background | --p-menubar-background | Background of root |
401
+ | menubar.border.color | --p-menubar-border-color | Border color of root |
402
+ | menubar.border.radius | --p-menubar-border-radius | Border radius of root |
403
+ | menubar.color | --p-menubar-color | Color of root |
404
+ | menubar.gap | --p-menubar-gap | Gap of root |
405
+ | menubar.padding | --p-menubar-padding | Padding of root |
406
+ | menubar.transition.duration | --p-menubar-transition-duration | Transition duration of root |
407
+ | menubar.base.item.border.radius | --p-menubar-base-item-border-radius | Border radius of base item |
408
+ | menubar.base.item.padding | --p-menubar-base-item-padding | Padding of base item |
409
+ | menubar.item.focus.background | --p-menubar-item-focus-background | Focus background of item |
410
+ | menubar.item.active.background | --p-menubar-item-active-background | Active background of item |
411
+ | menubar.item.color | --p-menubar-item-color | Color of item |
412
+ | menubar.item.focus.color | --p-menubar-item-focus-color | Focus color of item |
413
+ | menubar.item.active.color | --p-menubar-item-active-color | Active color of item |
414
+ | menubar.item.padding | --p-menubar-item-padding | Padding of item |
415
+ | menubar.item.border.radius | --p-menubar-item-border-radius | Border radius of item |
416
+ | menubar.item.gap | --p-menubar-item-gap | Gap of item |
417
+ | menubar.item.icon.color | --p-menubar-item-icon-color | Icon color of item |
418
+ | menubar.item.icon.focus.color | --p-menubar-item-icon-focus-color | Icon focus color of item |
419
+ | menubar.item.icon.active.color | --p-menubar-item-icon-active-color | Icon active color of item |
420
+ | menubar.item.icon.size | --p-menubar-item-icon-size | Icon size of item |
421
+ | menubar.item.label.font.weight | --p-menubar-item-label-font-weight | Font weight of item label |
422
+ | menubar.item.label.font.size | --p-menubar-item-label-font-size | Font size of item label |
423
+ | menubar.submenu.padding | --p-menubar-submenu-padding | Padding of submenu |
424
+ | menubar.submenu.gap | --p-menubar-submenu-gap | Gap of submenu |
425
+ | menubar.submenu.background | --p-menubar-submenu-background | Background of submenu |
426
+ | menubar.submenu.border.color | --p-menubar-submenu-border-color | Border color of submenu |
427
+ | menubar.submenu.border.radius | --p-menubar-submenu-border-radius | Border radius of submenu |
428
+ | menubar.submenu.shadow | --p-menubar-submenu-shadow | Shadow of submenu |
429
+ | menubar.submenu.mobile.indent | --p-menubar-submenu-mobile-indent | Mobile indent of submenu |
430
+ | menubar.submenu.icon.size | --p-menubar-submenu-icon-size | Icon size of submenu |
431
+ | menubar.submenu.icon.color | --p-menubar-submenu-icon-color | Icon color of submenu |
432
+ | menubar.submenu.icon.focus.color | --p-menubar-submenu-icon-focus-color | Icon focus color of submenu |
433
+ | menubar.submenu.icon.active.color | --p-menubar-submenu-icon-active-color | Icon active color of submenu |
434
+ | menubar.separator.border.color | --p-menubar-separator-border-color | Border color of separator |
435
+ | menubar.mobile.button.border.radius | --p-menubar-mobile-button-border-radius | Border radius of mobile button |
436
+ | menubar.mobile.button.size | --p-menubar-mobile-button-size | Size of mobile button |
437
+ | menubar.mobile.button.color | --p-menubar-mobile-button-color | Color of mobile button |
438
+ | menubar.mobile.button.hover.color | --p-menubar-mobile-button-hover-color | Hover color of mobile button |
439
+ | menubar.mobile.button.hover.background | --p-menubar-mobile-button-hover-background | Hover background of mobile button |
440
+ | menubar.mobile.button.focus.ring.width | --p-menubar-mobile-button-focus-ring-width | Focus ring width of mobile button |
441
+ | menubar.mobile.button.focus.ring.style | --p-menubar-mobile-button-focus-ring-style | Focus ring style of mobile button |
442
+ | menubar.mobile.button.focus.ring.color | --p-menubar-mobile-button-focus-ring-color | Focus ring color of mobile button |
443
+ | menubar.mobile.button.focus.ring.offset | --p-menubar-mobile-button-focus-ring-offset | Focus ring offset of mobile button |
444
+ | menubar.mobile.button.focus.ring.shadow | --p-menubar-mobile-button-focus-ring-shadow | Focus ring shadow of mobile button |
445
+
446
+ ## Menu Item API