@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,578 @@
1
+ # TieredMenu
2
+
3
+ TieredMenu displays submenus in nested overlays.
4
+
5
+ ## Basic
6
+
7
+ TieredMenu requires a collection of menuitems as its model .
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <TieredMenu :model="items" />
13
+ </div>
14
+ </template>
15
+
16
+ <script setup>
17
+ import { ref } from "vue";
18
+ import Copy from '@primeicons/vue/copy';
19
+ import File from '@primeicons/vue/file';
20
+ import FileEdit from '@primeicons/vue/file-edit';
21
+ import FolderOpen from '@primeicons/vue/folder-open';
22
+ import Image from '@primeicons/vue/image';
23
+ import Plus from '@primeicons/vue/plus';
24
+ import Print from '@primeicons/vue/print';
25
+ import Search from '@primeicons/vue/search';
26
+ import ShareAlt from '@primeicons/vue/share-alt';
27
+ import Slack from '@primeicons/vue/slack';
28
+ import Times from '@primeicons/vue/times';
29
+ import Video from '@primeicons/vue/video';
30
+ import Whatsapp from '@primeicons/vue/whatsapp';
31
+
32
+ const items = ref([
33
+ {
34
+ label: 'File',
35
+ icon: File,
36
+ items: [
37
+ {
38
+ label: 'New',
39
+ icon: Plus,
40
+ items: [
41
+ {
42
+ label: 'Document',
43
+ icon: File
44
+ },
45
+ {
46
+ label: 'Image',
47
+ icon: Image
48
+ },
49
+ {
50
+ label: 'Video',
51
+ icon: Video
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ label: 'Open',
57
+ icon: FolderOpen
58
+ },
59
+ {
60
+ label: 'Print',
61
+ icon: Print
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ label: 'Edit',
67
+ icon: FileEdit,
68
+ items: [
69
+ {
70
+ label: 'Copy',
71
+ icon: Copy
72
+ },
73
+ {
74
+ label: 'Delete',
75
+ icon: Times
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ label: 'Search',
81
+ icon: Search
82
+ },
83
+ {
84
+ separator: true
85
+ },
86
+ {
87
+ label: 'Share',
88
+ icon: ShareAlt,
89
+ items: [
90
+ {
91
+ label: 'Slack',
92
+ icon: Slack
93
+ },
94
+ {
95
+ label: 'Whatsapp',
96
+ icon: Whatsapp
97
+ }
98
+ ]
99
+ }
100
+ ]);
101
+ <\/script>
102
+ ```
103
+
104
+ ## Popup
105
+
106
+ Popup mode is enabled by adding popup property and calling toggle method with an event of the target.
107
+
108
+ ```vue
109
+ <template>
110
+ <div class="flex justify-center">
111
+ <Button type="button" @click="toggle" aria-haspopup="true" aria-controls="overlay_tmenu">Toggle</Button>
112
+ <TieredMenu ref="menu" id="overlay_tmenu" :model="items" popup />
113
+ </div>
114
+ </template>
115
+
116
+ <script setup>
117
+ import { ref } from "vue";
118
+ import Copy from '@primeicons/vue/copy';
119
+ import File from '@primeicons/vue/file';
120
+ import FileEdit from '@primeicons/vue/file-edit';
121
+ import FolderOpen from '@primeicons/vue/folder-open';
122
+ import Image from '@primeicons/vue/image';
123
+ import Plus from '@primeicons/vue/plus';
124
+ import Print from '@primeicons/vue/print';
125
+ import Search from '@primeicons/vue/search';
126
+ import ShareAlt from '@primeicons/vue/share-alt';
127
+ import Slack from '@primeicons/vue/slack';
128
+ import Times from '@primeicons/vue/times';
129
+ import Video from '@primeicons/vue/video';
130
+ import Whatsapp from '@primeicons/vue/whatsapp';
131
+
132
+ const menu = ref();
133
+ const items = ref([
134
+ {
135
+ label: 'File',
136
+ icon: File,
137
+ items: [
138
+ {
139
+ label: 'New',
140
+ icon: Plus,
141
+ items: [
142
+ {
143
+ label: 'Document',
144
+ icon: File
145
+ },
146
+ {
147
+ label: 'Image',
148
+ icon: Image
149
+ },
150
+ {
151
+ label: 'Video',
152
+ icon: Video
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ label: 'Open',
158
+ icon: FolderOpen
159
+ },
160
+ {
161
+ label: 'Print',
162
+ icon: Print
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ label: 'Edit',
168
+ icon: FileEdit,
169
+ items: [
170
+ {
171
+ label: 'Copy',
172
+ icon: Copy
173
+ },
174
+ {
175
+ label: 'Delete',
176
+ icon: Times
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ label: 'Search',
182
+ icon: Search
183
+ },
184
+ {
185
+ separator: true
186
+ },
187
+ {
188
+ label: 'Share',
189
+ icon: ShareAlt,
190
+ items: [
191
+ {
192
+ label: 'Slack',
193
+ icon: Slack
194
+ },
195
+ {
196
+ label: 'Whatsapp',
197
+ icon: Whatsapp
198
+ }
199
+ ]
200
+ }
201
+ ]);
202
+
203
+ const toggle = (event) => {
204
+ menu.value.toggle(event);
205
+ };
206
+ <\/script>
207
+ ```
208
+
209
+ ## Template
210
+
211
+ TieredMenu offers item customization with the item template that receives the menuitem instance from the model as a parameter.
212
+
213
+ ```vue
214
+ <template>
215
+ <div class="flex justify-center">
216
+ <TieredMenu :model="items">
217
+ <template #item="{ item, icon, props, hasSubmenu }">
218
+ <a v-ripple class="flex items-center px-3 py-2 cursor-pointer" v-bind="props.action">
219
+ <component :is="icon" />
220
+ <span class="ms-2 text-sm">{{ item.label }}</span>
221
+ <Badge v-if="item.badge" class="ml-auto" :value="item.badge" />
222
+ <span v-if="item.shortcut" class="ml-auto border border-surface rounded-sm bg-emphasis text-muted-color text-xs p-1">{{ item.shortcut }}</span>
223
+ <AngleRight v-if="hasSubmenu" class="ms-auto" />
224
+ </a>
225
+ </template>
226
+ </TieredMenu>
227
+ </div>
228
+ </template>
229
+
230
+ <script setup>
231
+ import AngleRight from '@primeicons/vue/angle-right';
232
+ import { ref } from "vue";
233
+ import Copy from '@primeicons/vue/copy';
234
+ import File from '@primeicons/vue/file';
235
+ import FileEdit from '@primeicons/vue/file-edit';
236
+ import FolderOpen from '@primeicons/vue/folder-open';
237
+ import Image from '@primeicons/vue/image';
238
+ import Plus from '@primeicons/vue/plus';
239
+ import Print from '@primeicons/vue/print';
240
+ import Search from '@primeicons/vue/search';
241
+ import ShareAlt from '@primeicons/vue/share-alt';
242
+ import Slack from '@primeicons/vue/slack';
243
+ import Times from '@primeicons/vue/times';
244
+ import Video from '@primeicons/vue/video';
245
+ import Whatsapp from '@primeicons/vue/whatsapp';
246
+
247
+ const items = ref([
248
+ {
249
+ label: 'File',
250
+ icon: File,
251
+ items: [
252
+ {
253
+ label: 'New',
254
+ icon: Plus,
255
+ items: [
256
+ {
257
+ label: 'Docs',
258
+ icon: File,
259
+ shortcut: '⌘+N'
260
+ },
261
+ {
262
+ label: 'Image',
263
+ icon: Image,
264
+ shortcut: '⌘+I'
265
+ },
266
+ {
267
+ label: 'Video',
268
+ icon: Video,
269
+ shortcut: '⌘+L'
270
+ }
271
+ ]
272
+ },
273
+ {
274
+ label: 'Open',
275
+ icon: FolderOpen,
276
+ shortcut: '⌘+O'
277
+ },
278
+ {
279
+ label: 'Print',
280
+ icon: Print,
281
+ shortcut: '⌘+P'
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ label: 'Edit',
287
+ icon: FileEdit,
288
+ items: [
289
+ {
290
+ label: 'Copy',
291
+ icon: Copy,
292
+ shortcut: '⌘+C'
293
+ },
294
+ {
295
+ label: 'Delete',
296
+ icon: Times,
297
+ shortcut: '⌘+D'
298
+ }
299
+ ]
300
+ },
301
+ {
302
+ label: 'Search',
303
+ icon: Search,
304
+ shortcut: '⌘+S'
305
+ },
306
+ {
307
+ separator: true
308
+ },
309
+ {
310
+ label: 'Share',
311
+ icon: ShareAlt,
312
+ items: [
313
+ {
314
+ label: 'Slack',
315
+ icon: Slack,
316
+ badge: 2
317
+ },
318
+ {
319
+ label: 'Whatsapp',
320
+ icon: Whatsapp,
321
+ badge: 3
322
+ }
323
+ ]
324
+ }
325
+ ]);
326
+ <\/script>
327
+ ```
328
+
329
+ ## Command
330
+
331
+ The command property defines the callback to run when an item is activated by click or a key event.
332
+
333
+ ```vue
334
+ <template>
335
+ <div class="flex justify-center">
336
+ <TieredMenu :model="items" />
337
+ <Toast />
338
+ </div>
339
+ </template>
340
+
341
+ <script setup>
342
+ import { ref } from "vue";
343
+ import Cloud from '@primeicons/vue/cloud';
344
+ import CloudDownload from '@primeicons/vue/cloud-download';
345
+ import CloudUpload from '@primeicons/vue/cloud-upload';
346
+ import File from '@primeicons/vue/file';
347
+ import Plus from '@primeicons/vue/plus';
348
+ import Print from '@primeicons/vue/print';
349
+ import Search from '@primeicons/vue/search';
350
+ import { useToast } from "primevue/usetoast";
351
+
352
+ const toast = useToast();
353
+
354
+ const items = ref([
355
+ {
356
+ label: 'File',
357
+ icon: File,
358
+ items: [
359
+ {
360
+ label: 'New',
361
+ icon: Plus,
362
+ command: () => {
363
+ toast.add({ severity: 'success', summary: 'Success', detail: 'File created', life: 3000 });
364
+ }
365
+ },
366
+ {
367
+ label: 'Print',
368
+ icon: Print,
369
+ command: () => {
370
+ toast.add({ severity: 'error', summary: 'Error', detail: 'No printer connected', life: 3000 });
371
+ }
372
+ }
373
+ ]
374
+ },
375
+ {
376
+ label: 'Search',
377
+ icon: Search,
378
+ command: () => {
379
+ toast.add({ severity: 'warn', summary: 'Search Results', detail: 'No results found', life: 3000 });
380
+ }
381
+ },
382
+ {
383
+ separator: true
384
+ },
385
+ {
386
+ label: 'Sync',
387
+ icon: Cloud,
388
+ items: [
389
+ {
390
+ label: 'Import',
391
+ icon: CloudDownload,
392
+ command: () => {
393
+ toast.add({ severity: 'info', summary: 'Downloads', detail: 'Downloaded from cloud', life: 3000 });
394
+ }
395
+ },
396
+ {
397
+ label: 'Export',
398
+ icon: CloudUpload,
399
+ command: () => {
400
+ toast.add({ severity: 'info', summary: 'Shared', detail: 'Exported to cloud', life: 3000 });
401
+ }
402
+ }
403
+ ]
404
+ }
405
+ ]);
406
+ <\/script>
407
+ ```
408
+
409
+ ## Router
410
+
411
+ Menu items support navigation via router-link, programmatic routing using commands, or external URLs.
412
+
413
+ ```vue
414
+ <template>
415
+ <div class="flex justify-center">
416
+ <TieredMenu :model="items">
417
+ <template #item="{ item, icon, props, hasSubmenu }">
418
+ <router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
419
+ <a v-ripple :href="href" v-bind="props.action" @click="navigate">
420
+ <component :is="icon" />
421
+ <span class="ml-2">{{ item.label }}</span>
422
+ </a>
423
+ </router-link>
424
+ <a v-else v-ripple :href="item.url" :target="item.target" v-bind="props.action">
425
+ <component :is="icon" />
426
+ <span class="ml-2">{{ item.label }}</span>
427
+ <AngleRight v-if="hasSubmenu" class="ml-auto" />
428
+ </a>
429
+ </template>
430
+ </TieredMenu>
431
+ </div>
432
+ </template>
433
+
434
+ <script setup>
435
+ import { ref } from "vue";
436
+ import AngleRight from '@primeicons/vue/angle-right';
437
+ import Home from '@primeicons/vue/home';
438
+ import Link from '@primeicons/vue/link';
439
+ import Palette from '@primeicons/vue/palette';
440
+ import { useRouter } from 'vue-router';
441
+
442
+ const router = useRouter();
443
+
444
+ const items = ref([
445
+ {
446
+ label: 'Router',
447
+ icon: Palette,
448
+ items: [
449
+ {
450
+ label: 'Theming',
451
+ route: '/theming/styled'
452
+ },
453
+ {
454
+ label: 'UI Kit',
455
+ route: '/uikit'
456
+ }
457
+ ]
458
+ },
459
+ {
460
+ label: 'Programmatic',
461
+ icon: Link,
462
+ command: () => {
463
+ router.push('/introduction');
464
+ }
465
+ },
466
+ {
467
+ label: 'External',
468
+ icon: Home,
469
+ items: [
470
+ {
471
+ label: 'Vue.js',
472
+ url: 'https://vuejs.org/'
473
+ },
474
+ {
475
+ label: 'Vite.js',
476
+ url: 'https://vite.dev/'
477
+ }
478
+ ]
479
+ }
480
+ ]);
481
+ <\/script>
482
+ ```
483
+
484
+ ## Accessibility
485
+
486
+ Screen Reader TieredMenu component uses the menubar role with aria-orientation set to "vertical" 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. A submenu within a TieredMenu 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 popup mode, the component implicitly manages the aria-expanded , aria-haspopup and aria-controls attributes of the target element to define the relation between the target and the popup. 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 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 Moves focus to the next menuitem within the submenu. up arrow Moves focus to the previous menuitem within the submenu. right arrow Opens a submenu if there is one available and moves focus to the first item. left arrow 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.
487
+
488
+ ## Tiered Menu API
489
+
490
+ ### Props
491
+
492
+ | Name |Type |Default |Description |
493
+ | --- | --- | --- | --- |
494
+ | model | MenuItem[] | - | An array of menuitems. |
495
+ | popup | boolean | false | Defines if menu would displayed as a popup. |
496
+ | breakpoint | string | 960px | The breakpoint to define the maximum width boundary. |
497
+ | appendTo | HTMLElement \| HintedString<"body" \| "self"> | body | A valid query selector or an HTMLElement to specify where the overlay gets attached. |
498
+ | autoZIndex | boolean | true | Whether to automatically manage layering. |
499
+ | baseZIndex | number | 0 | Base zIndex value to use in layering. |
500
+ | disabled | boolean | false | When present, it specifies that the component should be disabled. |
501
+ | tabindex | string \| number | - | Index of the element in tabbing order. |
502
+ | ariaLabel | string | - | Defines a string value that labels an interactive element. |
503
+ | ariaLabelledby | string | - | Identifier of the underlying menu element. |
504
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
505
+ | pt | PassThrough<TieredMenuPassThroughOptions<any>> | - | Used to pass attributes to DOM elements inside the component. |
506
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
507
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
508
+
509
+ ### Pass Through Options
510
+
511
+ | Name |Type |Description |
512
+ | --- | --- | --- |
513
+ | root | TieredMenuPassThroughOptionType<T> | Used to pass attributes to the root's DOM element. |
514
+ | rootList | TieredMenuPassThroughOptionType<T> | Used to pass attributes to the root list's DOM element. |
515
+ | item | TieredMenuPassThroughOptionType<T> | Used to pass attributes to the list item's DOM element. |
516
+ | itemContent | TieredMenuPassThroughOptionType<T> | Used to pass attributes to the item content's DOM element. |
517
+ | itemLink | TieredMenuPassThroughOptionType<T> | Used to pass attributes to the item link's DOM element. |
518
+ | itemIcon | TieredMenuPassThroughOptionType<T> | Used to pass attributes to the item icon's DOM element. |
519
+ | itemLabel | TieredMenuPassThroughOptionType<T> | Used to pass attributes to the item label's DOM element. |
520
+ | submenuIcon | TieredMenuPassThroughOptionType<T> | Used to pass attributes to the submenu icon's DOM element. |
521
+ | separator | TieredMenuPassThroughOptionType<T> | Used to pass attributes to the separator's DOM element. |
522
+ | submenu | TieredMenuPassThroughOptionType<T> | Used to pass attributes to the submenu's DOM element. |
523
+ | hooks | any | Used to manage all lifecycle hooks. |
524
+ | transition | TieredMenuPassThroughTransitionType<any> | Used to control Vue Transition API. |
525
+
526
+ ### Theming
527
+
528
+ ### CSS Classes
529
+
530
+ | Class |Description |
531
+ | --- | --- |
532
+ | p-tieredmenu | Class name of the root element |
533
+ | p-tieredmenu-start | Class name of the start element |
534
+ | p-tieredmenu-root-list | Class name of the root list element |
535
+ | p-tieredmenu-item | Class name of the item element |
536
+ | p-tieredmenu-item-content | Class name of the item content element |
537
+ | p-tieredmenu-item-link | Class name of the item link element |
538
+ | p-tieredmenu-item-icon | Class name of the item icon element |
539
+ | p-tieredmenu-item-label | Class name of the item label element |
540
+ | p-tieredmenu-submenu-icon | Class name of the submenu icon element |
541
+ | p-tieredmenu-submenu | Class name of the submenu element |
542
+ | p-tieredmenu-separator | Class name of the separator element |
543
+ | p-tieredmenu-end | Class name of the end element |
544
+
545
+ ### Design Tokens
546
+
547
+ | Token |CSS Variable |Description |
548
+ | --- | --- | --- |
549
+ | tieredmenu.background | --p-tieredmenu-background | Background of root |
550
+ | tieredmenu.border.color | --p-tieredmenu-border-color | Border color of root |
551
+ | tieredmenu.color | --p-tieredmenu-color | Color of root |
552
+ | tieredmenu.border.radius | --p-tieredmenu-border-radius | Border radius of root |
553
+ | tieredmenu.shadow | --p-tieredmenu-shadow | Shadow of root |
554
+ | tieredmenu.transition.duration | --p-tieredmenu-transition-duration | Transition duration of root |
555
+ | tieredmenu.list.padding | --p-tieredmenu-list-padding | Padding of list |
556
+ | tieredmenu.list.gap | --p-tieredmenu-list-gap | Gap of list |
557
+ | tieredmenu.item.focus.background | --p-tieredmenu-item-focus-background | Focus background of item |
558
+ | tieredmenu.item.active.background | --p-tieredmenu-item-active-background | Active background of item |
559
+ | tieredmenu.item.color | --p-tieredmenu-item-color | Color of item |
560
+ | tieredmenu.item.focus.color | --p-tieredmenu-item-focus-color | Focus color of item |
561
+ | tieredmenu.item.active.color | --p-tieredmenu-item-active-color | Active color of item |
562
+ | tieredmenu.item.padding | --p-tieredmenu-item-padding | Padding of item |
563
+ | tieredmenu.item.border.radius | --p-tieredmenu-item-border-radius | Border radius of item |
564
+ | tieredmenu.item.gap | --p-tieredmenu-item-gap | Gap of item |
565
+ | tieredmenu.item.icon.color | --p-tieredmenu-item-icon-color | Icon color of item |
566
+ | tieredmenu.item.icon.focus.color | --p-tieredmenu-item-icon-focus-color | Icon focus color of item |
567
+ | tieredmenu.item.icon.active.color | --p-tieredmenu-item-icon-active-color | Icon active color of item |
568
+ | tieredmenu.item.icon.size | --p-tieredmenu-item-icon-size | Icon size of item |
569
+ | tieredmenu.item.label.font.weight | --p-tieredmenu-item-label-font-weight | Font weight of item label |
570
+ | tieredmenu.item.label.font.size | --p-tieredmenu-item-label-font-size | Font size of item label |
571
+ | tieredmenu.submenu.mobile.indent | --p-tieredmenu-submenu-mobile-indent | Mobile indent of submenu |
572
+ | tieredmenu.submenu.icon.size | --p-tieredmenu-submenu-icon-size | Size of submenu icon |
573
+ | tieredmenu.submenu.icon.color | --p-tieredmenu-submenu-icon-color | Color of submenu icon |
574
+ | tieredmenu.submenu.icon.focus.color | --p-tieredmenu-submenu-icon-focus-color | Focus color of submenu icon |
575
+ | tieredmenu.submenu.icon.active.color | --p-tieredmenu-submenu-icon-active-color | Active color of submenu icon |
576
+ | tieredmenu.separator.border.color | --p-tieredmenu-separator-border-color | Border color of separator |
577
+
578
+ ## Menu Item API