@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,702 @@
1
+ # Dialog
2
+
3
+ Dialog is a container to display content in an overlay window.
4
+
5
+ ## Basic
6
+
7
+ Dialog is used as a container and visibility is controlled with a binding to visible property.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <Button @click="visible = true">Edit Profile</Button>
13
+ <Dialog v-model:visible="visible" modal header="Edit Profile" :style="{ width: '24rem' }">
14
+ <div class="flex flex-col gap-4">
15
+ <div class="flex flex-col gap-1.5">
16
+ <Label for="name">Name</Label>
17
+ <InputText id="name" v-model="name" autoFocus />
18
+ </div>
19
+ <div class="flex flex-col gap-1.5">
20
+ <Label for="email">Email</Label>
21
+ <InputText id="email" v-model="email" />
22
+ </div>
23
+ </div>
24
+ <template #footer>
25
+ <Button severity="secondary" variant="outlined" @click="visible = false">Cancel</Button>
26
+ <Button @click="visible = false">Save</Button>
27
+ </template>
28
+ </Dialog>
29
+ </div>
30
+ </template>
31
+
32
+ <script setup>
33
+ import { ref } from 'vue';
34
+
35
+ const visible = ref(false);
36
+ const name = ref('Amanda Miller');
37
+ const email = ref('amanda@example.com');
38
+ <\/script>
39
+ ```
40
+
41
+ ## Template
42
+
43
+ Header and Footer sections allow customization via templating.
44
+
45
+ ```vue
46
+ <template>
47
+ <div class="flex justify-center">
48
+ <Button @click="visible = true">Show</Button>
49
+ <Dialog v-model:visible="visible" modal :style="{ width: '25rem' }">
50
+ <template #header>
51
+ <div class="inline-flex items-center justify-center gap-2">
52
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
53
+ <span class="font-bold whitespace-nowrap">Amy Elsner</span>
54
+ </div>
55
+ </template>
56
+ <span class="text-surface-500 dark:text-surface-400 block mb-8 text-sm">Update your information.</span>
57
+ <div class="flex items-center gap-4 mb-4">
58
+ <label for="username" class="font-semibold w-24 text-sm">Username</label>
59
+ <InputText id="username" class="flex-auto" autocomplete="off" />
60
+ </div>
61
+ <div class="flex items-center gap-4 mb-2">
62
+ <label for="email" class="font-semibold w-24 text-sm">Email</label>
63
+ <InputText id="email" class="flex-auto" autocomplete="off" />
64
+ </div>
65
+ <template #footer>
66
+ <Button text severity="secondary" @click="visible = false">Cancel</Button>
67
+ <Button variant="outlined" severity="secondary" @click="visible = false">Save</Button>
68
+ </template>
69
+ </Dialog>
70
+ </div>
71
+ </template>
72
+
73
+ <script setup>
74
+ import { ref } from "vue";
75
+
76
+ const visible = ref(false);
77
+ <\/script>
78
+ ```
79
+
80
+ ## Draggable
81
+
82
+ Enabling the draggable property lets the user reposition the Dialog by dragging it from its header.
83
+
84
+ ```vue
85
+ <template>
86
+ <div class="flex justify-center">
87
+ <Button @click="visible = true">Open Note</Button>
88
+ <Dialog v-model:visible="visible" draggable modal header="Quick Note" :style="{ width: '24rem' }">
89
+ <div class="flex flex-col gap-4">
90
+ <p class="text-sm text-surface-500 dark:text-surface-400 mt-0 mb-0">Drag this dialog by its header to reposition it anywhere on the screen.</p>
91
+ <Textarea v-model="note" class="w-full h-32 resize-none" placeholder="Type your note here..." autoFocus />
92
+ </div>
93
+ <template #footer>
94
+ <Button severity="secondary" @click="visible = false">Discard</Button>
95
+ <Button @click="visible = false">Save Note</Button>
96
+ </template>
97
+ </Dialog>
98
+ </div>
99
+ </template>
100
+
101
+ <script setup>
102
+ import { ref } from 'vue';
103
+
104
+ const visible = ref(false);
105
+ const note = ref('Remember to review the design specs for the new dashboard layout before the meeting tomorrow.');
106
+ <\/script>
107
+ ```
108
+
109
+ ## Position
110
+
111
+ The position property is used to display a Dialog at all edges and corners of the screen.
112
+
113
+ ```vue
114
+ <template>
115
+ <div>
116
+ <div class="flex flex-wrap justify-center gap-2 mb-2">
117
+ <Button severity="secondary" class="min-w-40" @click="openPosition('left')">
118
+ Left
119
+ <ArrowLeft />
120
+ </Button>
121
+ <Button severity="secondary" class="min-w-40" @click="openPosition('right')">
122
+ Right
123
+ <ArrowRight />
124
+ </Button>
125
+ </div>
126
+ <div class="flex flex-wrap justify-center gap-2 mb-2">
127
+ <Button severity="secondary" class="min-w-40" @click="openPosition('topleft')">
128
+ TopLeft
129
+ <ArrowUpLeft />
130
+ </Button>
131
+ <Button severity="secondary" class="min-w-40" @click="openPosition('top')">
132
+ Top
133
+ <ArrowUp />
134
+ </Button>
135
+ <Button severity="secondary" class="min-w-40" @click="openPosition('topright')">
136
+ TopRight
137
+ <ArrowUpRight />
138
+ </Button>
139
+ </div>
140
+ <div class="flex flex-wrap justify-center gap-2">
141
+ <Button severity="secondary" class="min-w-40" @click="openPosition('bottomleft')">
142
+ BottomLeft
143
+ <ArrowDownLeft />
144
+ </Button>
145
+ <Button severity="secondary" class="min-w-40" @click="openPosition('bottom')">
146
+ Bottom
147
+ <ArrowDown />
148
+ </Button>
149
+ <Button severity="secondary" class="min-w-40" @click="openPosition('bottomright')">
150
+ BottomRight
151
+ <ArrowDownRight />
152
+ </Button>
153
+ </div>
154
+
155
+ <Dialog v-model:visible="visible" :position="position" modal :draggable="false" header="Edit Profile" :style="{ width: '25rem' }">
156
+ <div class="flex flex-col gap-6">
157
+ <span class="text-surface-500 dark:text-surface-400">Update your information.</span>
158
+ <div class="flex flex-col gap-1">
159
+ <Label for="username" class="font-semibold">Username</Label>
160
+ <InputText id="username" v-model="username" autoFocus/>
161
+ </div>
162
+ <div class="flex flex-col gap-1">
163
+ <Label for="email" class="font-semibold">Email</Label>
164
+ <InputText id="email" v-model="email" />
165
+ </div>
166
+ <div class="flex justify-end gap-2">
167
+ <Button severity="secondary" @click="visible = false">Cancel</Button>
168
+ <Button @click="visible = false">Save</Button>
169
+ </div>
170
+ </div>
171
+ </Dialog>
172
+ </div>
173
+ </template>
174
+
175
+ <script setup>
176
+ import { ref } from 'vue';
177
+ import ArrowDown from '@primeicons/vue/arrow-down';
178
+ import ArrowDownLeft from '@primeicons/vue/arrow-down-left';
179
+ import ArrowDownRight from '@primeicons/vue/arrow-down-right';
180
+ import ArrowLeft from '@primeicons/vue/arrow-left';
181
+ import ArrowRight from '@primeicons/vue/arrow-right';
182
+ import ArrowUp from '@primeicons/vue/arrow-up';
183
+ import ArrowUpLeft from '@primeicons/vue/arrow-up-left';
184
+ import ArrowUpRight from '@primeicons/vue/arrow-up-right';
185
+
186
+ const position = ref('center');
187
+ const visible = ref(false);
188
+ const username = ref('');
189
+ const email = ref('');
190
+
191
+ const openPosition = (pos) => {
192
+ position.value = pos;
193
+ visible.value = true;
194
+ };
195
+ <\/script>
196
+ ```
197
+
198
+ ## Maximizable
199
+
200
+ Adding maximizable property enables the full screen mode.
201
+
202
+ ```vue
203
+ <template>
204
+ <div class="flex justify-center">
205
+ <Button @click="visible = true">Show</Button>
206
+ <Dialog v-model:visible="visible" maximizable modal header="Article Preview" :style="{ width: '50rem' }">
207
+ <div class="flex flex-col gap-4">
208
+ <div class="flex items-center gap-2 text-sm text-surface-500 dark:text-surface-400">
209
+ <span>Published on Feb 1, 2026</span>
210
+ <span>·</span>
211
+ <span>5 min read</span>
212
+ </div>
213
+ <h2 class="text-xl font-bold mt-0 mb-0">Getting Started with Component-Driven Development</h2>
214
+ <p class="leading-relaxed mt-0 mb-0">
215
+ Component-driven development is an approach that focuses on building loosely coupled, independent components that can be composed together to build complex user interfaces. This methodology promotes reusability, testability, and
216
+ maintainability.
217
+ </p>
218
+ <p class="leading-relaxed mt-0 mb-0">
219
+ By breaking down the UI into smaller, self-contained pieces, teams can work in parallel on different parts of the application without stepping on each other's toes. Each component encapsulates its own logic, styles, and behavior,
220
+ making it easier to reason about and test in isolation.
221
+ </p>
222
+ <p class="leading-relaxed mt-0 mb-0">
223
+ Modern frameworks and libraries have embraced this pattern, providing tools and conventions that make it straightforward to create, compose, and manage components at scale. The result is a more predictable, scalable, and
224
+ enjoyable development experience.
225
+ </p>
226
+ </div>
227
+ <template #footer>
228
+ <div class="flex items-center justify-between w-full text-sm text-surface-500 dark:text-surface-400">
229
+ <span>Last updated: Feb 1, 2026</span>
230
+ <span>Author: Jane Doe</span>
231
+ </div>
232
+ </template>
233
+ </Dialog>
234
+ </div>
235
+ </template>
236
+
237
+ <script setup>
238
+ import { ref } from 'vue';
239
+
240
+ const visible = ref(false);
241
+ <\/script>
242
+ ```
243
+
244
+ ## Full Screen
245
+
246
+ A full screen Dialog can be achieved by sizing the component to the viewport with utility classes such as w-screen and h-screen .
247
+
248
+ ```vue
249
+ <template>
250
+ <div class="flex justify-center">
251
+ <Button @click="visible = true">View Gallery</Button>
252
+ <Dialog v-model:visible="visible" modal header="Photo Gallery" class="w-screen! h-screen! max-h-screen! rounded-none!">
253
+ <div class="flex flex-col gap-4">
254
+ <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-3">
255
+ <div v-for="i in 18" :key="i" class="aspect-square rounded-lg bg-surface-100 dark:bg-surface-800 flex items-center justify-center">
256
+ <ImageIcon class="text-2xl text-surface-400" />
257
+ </div>
258
+ </div>
259
+ <p class="text-sm text-surface-500 dark:text-surface-400 mt-0 mb-0">Showing 18 of 64 photos</p>
260
+ </div>
261
+ </Dialog>
262
+ </div>
263
+ </template>
264
+
265
+ <script setup>
266
+ import { ref } from 'vue';
267
+ import ImageIcon from '@primeicons/vue/image';
268
+
269
+ const visible = ref(false);
270
+ <\/script>
271
+ ```
272
+
273
+ ## Modal
274
+
275
+ Mask layer behind the Dialog is enabled with the modal property, and dismissableMask allows closing it by clicking outside.
276
+
277
+ ```vue
278
+ <template>
279
+ <div class="flex justify-center">
280
+ <Button @click="visible = true">Edit Profile</Button>
281
+ <Dialog v-model:visible="visible" modal dismissableMask header="Edit Profile" :style="{ width: '25rem' }">
282
+ <div class="flex flex-col gap-6">
283
+ <span class="text-surface-500 dark:text-surface-400">Update your information. Click outside the dialog to dismiss.</span>
284
+ <div class="flex flex-col gap-1">
285
+ <Label for="username" class="font-semibold">Username</Label>
286
+ <InputText id="username" v-model="username" autoFocus />
287
+ </div>
288
+ <div class="flex flex-col gap-1">
289
+ <Label for="email" class="font-semibold">Email</Label>
290
+ <InputText id="email" v-model="email" />
291
+ </div>
292
+ <div class="flex justify-end gap-2">
293
+ <Button severity="secondary" @click="visible = false">Cancel</Button>
294
+ <Button @click="visible = false">Save</Button>
295
+ </div>
296
+ </div>
297
+ </Dialog>
298
+ </div>
299
+ </template>
300
+
301
+ <script setup>
302
+ import { ref } from 'vue';
303
+
304
+ const visible = ref(false);
305
+ const username = ref('');
306
+ const email = ref('');
307
+ <\/script>
308
+ ```
309
+
310
+ ## Without Modal
311
+
312
+ Mask layer behind the Dialog is configured with the modal property. By default, no modal layer is added.
313
+
314
+ ```vue
315
+ <template>
316
+ <div class="flex justify-center">
317
+ <Button @click="visible = true">Show</Button>
318
+ <Dialog v-model:visible="visible" header="Edit Profile" :style="{ width: '25rem' }">
319
+ <div class="flex flex-col gap-6">
320
+ <span class="text-surface-500 dark:text-surface-400">Update your information.</span>
321
+ <div class="flex flex-col gap-1">
322
+ <Label for="username" class="font-semibold">Username</Label>
323
+ <InputText id="username" v-model="username" autoFocus />
324
+ </div>
325
+ <div class="flex flex-col gap-1">
326
+ <Label for="email" class="font-semibold">Email</Label>
327
+ <InputText id="email" v-model="email" />
328
+ </div>
329
+ <div class="flex justify-end gap-2">
330
+ <Button severity="secondary" @click="visible = false">Cancel</Button>
331
+ <Button @click="visible = false">Save</Button>
332
+ </div>
333
+ </div>
334
+ </Dialog>
335
+ </div>
336
+ </template>
337
+
338
+ <script setup>
339
+ import { ref } from 'vue';
340
+
341
+ const visible = ref(false);
342
+ const username = ref('');
343
+ const email = ref('');
344
+ <\/script>
345
+ ```
346
+
347
+ ## Confirmation
348
+
349
+ A confirmation dialog can be built by disabling the header close button with closable and providing explicit actions in the content.
350
+
351
+ ```vue
352
+ <template>
353
+ <div class="flex justify-center">
354
+ <Button severity="danger" @click="visible = true">Delete Account</Button>
355
+ <Dialog v-model:visible="visible" modal :closable="false" header="Delete your account." :style="{ width: '26rem' }">
356
+ <div class="flex flex-col gap-4">
357
+ <p class="text-surface-500 dark:text-surface-400 text-sm mt-0 mb-0">This action cannot be undone. All of your data, including projects, files, and settings will be permanently removed.</p>
358
+ <div class="flex justify-end gap-2">
359
+ <Button severity="secondary" @click="visible = false">Cancel</Button>
360
+ <Button severity="danger" @click="visible = false">Delete</Button>
361
+ </div>
362
+ </div>
363
+ </Dialog>
364
+ </div>
365
+ </template>
366
+
367
+ <script setup>
368
+ import { ref } from 'vue';
369
+
370
+ const visible = ref(false);
371
+ <\/script>
372
+ ```
373
+
374
+ ## Long Content
375
+
376
+ When content exceeds the available space, the content area scrolls while the header and footer stay fixed.
377
+
378
+ ```vue
379
+ <template>
380
+ <div class="flex justify-center">
381
+ <Button @click="visible = true">Inside Scroll</Button>
382
+ <Dialog v-model:visible="visible" modal header="Terms of Service" :style="{ width: '40rem' }">
383
+ <div class="flex flex-col gap-4">
384
+ <div class="flex items-center gap-2">
385
+ <Tag value="Updated" severity="info" />
386
+ <span class="text-sm text-surface-500 dark:text-surface-400">Last revised: January 1, 2026</span>
387
+ </div>
388
+
389
+ <div>
390
+ <h3 class="text-base font-semibold mt-0 mb-2">1. Acceptance of Terms</h3>
391
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
392
+ By accessing and using this service, you accept and agree to be bound by the terms and provision of this agreement. If you do not agree to abide by the above, please do not use this service.
393
+ </p>
394
+ </div>
395
+
396
+ <div>
397
+ <h3 class="text-base font-semibold mt-0 mb-2">2. Use License</h3>
398
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
399
+ Permission is granted to temporarily download one copy of the materials on this service for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license
400
+ you may not modify or copy the materials, use the materials for any commercial purpose, or attempt to decompile or reverse engineer any software contained on this service.
401
+ </p>
402
+ </div>
403
+
404
+ <div>
405
+ <h3 class="text-base font-semibold mt-0 mb-2">3. Disclaimer</h3>
406
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
407
+ The materials on this service are provided on an 'as is' basis. We make no warranties, expressed or implied, and hereby disclaim and negate all other warranties including, without limitation, implied warranties or conditions
408
+ of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights.
409
+ </p>
410
+ </div>
411
+
412
+ <div>
413
+ <h3 class="text-base font-semibold mt-0 mb-2">4. Limitations</h3>
414
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
415
+ In no event shall we or our suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on
416
+ this service, even if we or an authorized representative has been notified orally or in writing of the possibility of such damage.
417
+ </p>
418
+ </div>
419
+
420
+ <div>
421
+ <h3 class="text-base font-semibold mt-0 mb-2">5. Privacy Policy</h3>
422
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
423
+ Your privacy is important to us. Our Privacy Policy explains how we collect, use, and protect your personal information when you use our service. By using our service, you agree to the collection and use of information in
424
+ accordance with our Privacy Policy. We are committed to ensuring that your information is secure and handled responsibly.
425
+ </p>
426
+ </div>
427
+
428
+ <div>
429
+ <h3 class="text-base font-semibold mt-0 mb-2">6. User Accounts</h3>
430
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
431
+ When you create an account with us, you must provide information that is accurate, complete, and current at all times. Failure to do so constitutes a breach of the Terms, which may result in immediate termination of your
432
+ account on our service. You are responsible for safeguarding the password that you use to access the service and for any activities or actions under your password.
433
+ </p>
434
+ </div>
435
+
436
+ <div>
437
+ <h3 class="text-base font-semibold mt-0 mb-2">7. Intellectual Property</h3>
438
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
439
+ The service and its original content, features, and functionality are and will remain the exclusive property of the company and its licensors. The service is protected by copyright, trademark, and other laws of both domestic
440
+ and foreign countries. Our trademarks and trade dress may not be used in connection with any product or service without the prior written consent of the company.
441
+ </p>
442
+ </div>
443
+
444
+ <div>
445
+ <h3 class="text-base font-semibold mt-0 mb-2">8. Termination</h3>
446
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
447
+ We may terminate or suspend your account immediately, without prior notice or liability, for any reason whatsoever, including without limitation if you breach the Terms. Upon termination, your right to use the service will
448
+ immediately cease. If you wish to terminate your account, you may simply discontinue using the service or contact us to request account deletion.
449
+ </p>
450
+ </div>
451
+
452
+ <div>
453
+ <h3 class="text-base font-semibold mt-0 mb-2">9. Indemnification</h3>
454
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
455
+ You agree to defend, indemnify, and hold harmless the company and its licensee and licensors, and their employees, contractors, agents, officers, and directors, from and against any and all claims, damages, obligations,
456
+ losses, liabilities, costs or debt, and expenses, including but not limited to attorney's fees, resulting from or arising out of your use and access of the service, or a breach of these Terms.
457
+ </p>
458
+ </div>
459
+
460
+ <div>
461
+ <h3 class="text-base font-semibold mt-0 mb-2">10. Governing Law</h3>
462
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
463
+ These terms and conditions are governed by and construed in accordance with applicable laws and you irrevocably submit to the exclusive jurisdiction of the courts in that location. Any claim relating to this service shall be
464
+ governed by the laws without regard to its conflict of law provisions.
465
+ </p>
466
+ </div>
467
+
468
+ <div>
469
+ <h3 class="text-base font-semibold mt-0 mb-2">11. Changes to Terms</h3>
470
+ <p class="text-sm leading-relaxed mt-0 mb-0 text-surface-600 dark:text-surface-300">
471
+ We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is material we will try to provide at least 30 days' notice prior to any new terms taking effect. What constitutes a
472
+ material change will be determined at our sole discretion. By continuing to access or use our service after those revisions become effective, you agree to be bound by the revised terms.
473
+ </p>
474
+ </div>
475
+ </div>
476
+ <template #footer>
477
+ <Button severity="secondary" @click="visible = false">Decline</Button>
478
+ <Button @click="visible = false">Accept</Button>
479
+ </template>
480
+ </Dialog>
481
+ </div>
482
+ </template>
483
+
484
+ <script setup>
485
+ import { ref } from 'vue';
486
+
487
+ const visible = ref(false);
488
+ <\/script>
489
+ ```
490
+
491
+ ## Responsive
492
+
493
+ Dialog dimensions can be made responsive with breakpoint-based utility classes applied directly to the component.
494
+
495
+ ```vue
496
+ <template>
497
+ <div class="flex justify-center">
498
+ <Button @click="visible = true">New Event</Button>
499
+ <Dialog v-model:visible="visible" modal header="Create Event" class="w-[90vw] md:w-[75vw] lg:w-[50vw]">
500
+ <div class="flex flex-col gap-4">
501
+ <div class="flex flex-col gap-1">
502
+ <Label for="eventName" class="text-sm font-semibold">Event Name</Label>
503
+ <InputText id="eventName" v-model="eventName" placeholder="e.g. Team Standup" autoFocus />
504
+ </div>
505
+ <div class="flex flex-col md:flex-row gap-4">
506
+ <div class="flex flex-col gap-1 flex-1">
507
+ <Label for="organizer" class="text-sm font-semibold">Organizer</Label>
508
+ <InputText id="organizer" v-model="organizer" placeholder="Name" />
509
+ </div>
510
+ <div class="flex flex-col gap-1 flex-1">
511
+ <Label for="email" class="text-sm font-semibold">Email</Label>
512
+ <InputText id="email" v-model="email" placeholder="organizer@example.com" />
513
+ </div>
514
+ </div>
515
+ <div class="flex flex-col gap-1">
516
+ <Label for="location" class="text-sm font-semibold">Location</Label>
517
+ <InputText id="location" v-model="location" placeholder="Add a location or video link" />
518
+ </div>
519
+ <div class="flex flex-col gap-1">
520
+ <Label for="description" class="text-sm font-semibold">Description</Label>
521
+ <InputText id="description" v-model="description" placeholder="Event details" />
522
+ </div>
523
+ <div class="flex flex-col sm:flex-row justify-end gap-2 mt-2">
524
+ <Button severity="secondary" @click="visible = false">Cancel</Button>
525
+ <Button @click="visible = false">Create Event</Button>
526
+ </div>
527
+ </div>
528
+ </Dialog>
529
+ </div>
530
+ </template>
531
+
532
+ <script setup>
533
+ import { ref } from 'vue';
534
+
535
+ const visible = ref(false);
536
+ const eventName = ref('');
537
+ const organizer = ref('');
538
+ const email = ref('');
539
+ const location = ref('');
540
+ const description = ref('');
541
+ <\/script>
542
+ ```
543
+
544
+ ## Headless
545
+
546
+ Headless mode is enabled by defining a container slot that lets you implement entire UI instead of the default elements.
547
+
548
+ ```vue
549
+ <template>
550
+ <div class="flex justify-center">
551
+ <Button @click="visible = true">
552
+ <User />
553
+ Login
554
+ </Button>
555
+
556
+ <Dialog v-model:visible="visible" pt:root:class="border-0! bg-transparent!" pt:mask:class="backdrop-blur-xs">
557
+ <template #container="{ closeCallback }">
558
+ <div class="flex flex-col px-8 py-8 gap-5 rounded-2xl" style="border-radius: 12px; background-image: radial-gradient(circle at left top, var(--p-primary-400), var(--p-primary-700))">
559
+ <svg width="35" height="40" viewBox="0 0 35 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="block mx-auto">
560
+ <path
561
+ 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"
562
+ fill="var(--p-primary-700)"
563
+ />
564
+ <path
565
+ 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"
566
+ fill="var(--p-primary-200)"
567
+ />
568
+ </svg>
569
+ <div class="inline-flex flex-col gap-2">
570
+ <label for="username" class="text-primary-50 font-semibold text-sm">Username</label>
571
+ <InputText id="username" class="bg-white/20! border-0! p-3! text-primary-50! w-80"></InputText>
572
+ </div>
573
+ <div class="inline-flex flex-col gap-2">
574
+ <label for="password" class="text-primary-50 font-semibold text-sm">Password</label>
575
+ <InputText id="password" class="bg-white/20! border-0! p-3! text-primary-50! w-80" type="password"></InputText>
576
+ </div>
577
+ <div class="flex items-center gap-4">
578
+ <Button @click="closeCallback" variant="text" class="p-3! w-full text-primary-50! border! border-white/30! hover:bg-white/10!">Cancel</Button>
579
+ <Button @click="closeCallback" variant="text" class="p-3! w-full text-primary-50! border! border-white/30! hover:bg-white/10!">Sign-In</Button>
580
+ </div>
581
+ </div>
582
+ </template>
583
+ </Dialog>
584
+ </div>
585
+ </template>
586
+
587
+ <script setup>
588
+ import { ref } from "vue";
589
+ import User from '@primeicons/vue/user';
590
+
591
+ const visible = ref(false);
592
+ <\/script>
593
+ ```
594
+
595
+ ## Accessibility
596
+
597
+ Screen Reader Dialog component uses dialog role along with aria-labelledby referring to the header element however any attribute is passed to the root element so you may use aria-labelledby to override this default behavior. In addition aria-modal is added since focus is kept within the popup. It is recommended to use a trigger component that can be accessed with keyboard such as a button, if not adding tabIndex would be necessary. Trigger element also requires aria-expanded and aria-controls to be handled explicitly. Close element is a button with an aria-label that refers to the aria.close property of the locale API by default, you may use closeButtonProps to customize the element and override the default aria-label . Maximize element is a button with an aria-label that refers to the aria.maximizeLabel and aria.minimizeLabel property of the locale API. It cannot be customized using the maximizeButtonProps . Overlay Keyboard Support Key Function tab Moves focus to the next the focusable element within the dialog if modal is true. Otherwise, the focusable element in the page tab sequence. shift + tab Moves focus to the previous the focusable element within the dialog if modal is true. Otherwise, the focusable element in the page tab sequence. escape Closes the dialog if closeOnEscape is true. Close Button Keyboard Support Key Function enter Closes the dialog. space Closes the dialog.
598
+
599
+ ```vue
600
+ <template>
601
+ <Button @click="visible = true" :aria-controls="visible ? 'dlg' : null" :aria-expanded="visible ? true : false">
602
+ <ExternalLink />
603
+ Show
604
+ </Button>
605
+
606
+ <Dialog id="dlg" header="Header" v-model:visible="visible" :style="{ width: '50vw' }">
607
+ <p>Content</p>
608
+ </Dialog>
609
+ </template>
610
+
611
+ <script setup>
612
+ import ExternalLink from '@primeicons/vue/external-link';
613
+ <\/script>
614
+ ```
615
+
616
+ ## Dialog API
617
+
618
+ ### Props
619
+
620
+ | Name |Type |Default |Description |
621
+ | --- | --- | --- | --- |
622
+ | header | string | - | Title content of the dialog. |
623
+ | footer | string | - | Footer content of the dialog. |
624
+ | visible | boolean | false | Specifies the visibility of the dialog. |
625
+ | modal | boolean | false | Defines if background should be blocked when dialog is displayed. |
626
+ | contentStyle | any | - | Style of the content section. |
627
+ | contentClass | any | - | Style class of the content section. |
628
+ | contentProps | HTMLAttributes | - | Used to pass all properties of the HTMLDivElement to the overlay Dialog inside the component. |
629
+ | closable | boolean | true | Adds a close icon to the header to hide the dialog. |
630
+ | dismissableMask | boolean | false | Specifies if clicking the modal background should hide the dialog. |
631
+ | closeOnEscape | boolean | true | Specifies if pressing escape key should hide the dialog. |
632
+ | showHeader | boolean | true | Whether to show the header or not. |
633
+ | blockScroll | boolean | false | Whether background scroll should be blocked when dialog is visible. |
634
+ | baseZIndex | number | 0 | Base zIndex value to use in layering. |
635
+ | autoZIndex | boolean | true | Whether to automatically manage layering. |
636
+ | position | HintedString<"left" \| "right" \| "top" \| "bottom" \| "center" \| "topleft" \| "topright" \| "bottomleft" \| "bottomright"> | center | Position of the dialog. |
637
+ | maximizable | boolean | false | Whether the dialog can be displayed full screen. |
638
+ | breakpoints | DialogBreakpoints | - | Object literal to define widths per screen size. |
639
+ | draggable | boolean | true | Enables dragging to change the position using header. |
640
+ | keepInViewport | boolean | true | Keeps dialog in the viewport when dragging. |
641
+ | minX | number | 0. | Minimum value for the left coordinate of dialog in dragging. |
642
+ | minY | number | 0 | Minimum value for the top coordinate of dialog in dragging. |
643
+ | appendTo | HTMLElement \| HintedString<"body" \| "self"> | body | A valid query selector or an HTMLElement to specify where the dialog gets attached. |
644
+ | style | any | - | Style of the dynamic dialog. |
645
+ | closeIcon | string | - | Icon to display in the dialog close button. |
646
+ | maximizeIcon | string | - | Icon to display in the dialog maximize button when dialog is not maximized. |
647
+ | minimizeIcon | string | - | Icon to display in the dialog maximize button when dialog is minimized. |
648
+ | closeButtonProps | object | - | Used to pass all properties of the ButtonProps to the Button component. |
649
+ | maximizeButtonProps | object | - | Used to pass all properties of the ButtonProps to the Button component. |
650
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
651
+ | pt | PassThrough<DialogPassThroughOptions<any>> | - | Used to pass attributes to DOM elements inside the component. |
652
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
653
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
654
+
655
+ ### Pass Through Options
656
+
657
+ | Name |Type |Description |
658
+ | --- | --- | --- |
659
+ | root | DialogPassThroughOptionType<T> | Used to pass attributes to the root's DOM element. |
660
+ | header | DialogPassThroughOptionType<T> | Used to pass attributes to the header's DOM element. |
661
+ | title | DialogPassThroughOptionType<T> | Used to pass attributes to the header title's DOM element. |
662
+ | headerActions | DialogPassThroughOptionType<T> | Used to pass attributes to the header actions' DOM element. |
663
+ | pcMaximizeButton | any | Used to pass attributes to the maximize Button component. |
664
+ | pcCloseButton | any | Used to pass attributes to the close Button component. |
665
+ | content | DialogPassThroughOptionType<T> | Used to pass attributes to the content's DOM element. |
666
+ | footer | DialogPassThroughOptionType<T> | Used to pass attributes to the footer's DOM element. |
667
+ | mask | DialogPassThroughOptionType<T> | Used to pass attributes to the mask's DOM element. |
668
+ | hooks | any | Used to manage all lifecycle hooks. |
669
+ | transition | DialogPassThroughTransitionType<T> | Used to control Vue Transition API. |
670
+
671
+ ### Theming
672
+
673
+ ### CSS Classes
674
+
675
+ | Class |Description |
676
+ | --- | --- |
677
+ | p-dialog-mask | Class name of the mask element |
678
+ | p-dialog | Class name of the root element |
679
+ | p-dialog-header | Class name of the header element |
680
+ | p-dialog-title | Class name of the title element |
681
+ | p-dialog-header-actions | Class name of the header actions element |
682
+ | p-dialog-maximize-button | Class name of the maximize button element |
683
+ | p-dialog-close-button | Class name of the close button element |
684
+ | p-dialog-content | Class name of the content element |
685
+ | p-dialog-footer | Class name of the footer element |
686
+
687
+ ### Design Tokens
688
+
689
+ | Token |CSS Variable |Description |
690
+ | --- | --- | --- |
691
+ | dialog.background | --p-dialog-background | Background of root |
692
+ | dialog.border.color | --p-dialog-border-color | Border color of root |
693
+ | dialog.color | --p-dialog-color | Color of root |
694
+ | dialog.border.radius | --p-dialog-border-radius | Border radius of root |
695
+ | dialog.shadow | --p-dialog-shadow | Shadow of root |
696
+ | dialog.header.padding | --p-dialog-header-padding | Padding of header |
697
+ | dialog.header.gap | --p-dialog-header-gap | Gap of header |
698
+ | dialog.title.font.size | --p-dialog-title-font-size | Font size of title |
699
+ | dialog.title.font.weight | --p-dialog-title-font-weight | Font weight of title |
700
+ | dialog.content.padding | --p-dialog-content-padding | Padding of content |
701
+ | dialog.footer.padding | --p-dialog-footer-padding | Padding of footer |
702
+ | dialog.footer.gap | --p-dialog-footer-gap | Gap of footer |