@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,221 @@
1
+ # Paginator
2
+
3
+ Paginator displays data in paged format and provides navigation between pages.
4
+
5
+ ## Basic
6
+
7
+ Paginator is used as a controlled component with first and rows properties to manage the first index and number of records to display per page. Total number of records need to be with totalRecords property. Default template includes a dropdown to change the rows so rowsPerPageOptions is also necessary for the dropdown options.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <Paginator v-model:first="first" v-model:rows="rows" :totalRecords="120" :rowsPerPageOptions="[10, 20, 30]" />
13
+ </div>
14
+ </template>
15
+
16
+ <script setup>
17
+ import { ref } from 'vue';
18
+
19
+ const first = ref(0);
20
+ const rows = ref(10);
21
+ <\/script>
22
+ ```
23
+
24
+ ## Template
25
+
26
+ Templating allows overriding the default content of the UI elements by defining callbacks using the element name.
27
+
28
+ ```vue
29
+ <template>
30
+ <div class="flex flex-col gap-4">
31
+ <div class="flex items-center justify-center">
32
+ <div>
33
+ <Button type="button" iconOnly variant="outlined"><Star /></Button>
34
+ </div>
35
+ <div class="flex-1">
36
+ <Paginator v-model:first="first1" v-model:rows="rows1" :totalRecords="120" :rowsPerPageOptions="[10, 20, 30]" template="PrevPageLink PageLinks NextPageLink RowsPerPageDropdown" />
37
+ </div>
38
+ <div class="justify-end">
39
+ <Button type="button" iconOnly><Search /></Button>
40
+ </div>
41
+ </div>
42
+ <Divider />
43
+ <div class="flex items-center justify-end">
44
+ <span class="mx-1 text-color">Items per page: </span>
45
+ <Select v-model="rows2" :options="options" optionLabel="label" optionValue="value" @change="first2 = 0" />
46
+ <Paginator v-model:first="first2" v-model:rows="rows2" :totalRecords="120" template="PrevPageLink CurrentPageReport NextPageLink" currentPageReportTemplate="{first} - {last} of {totalRecords}" />
47
+ </div>
48
+ <Divider />
49
+ <div class="flex items-center justify-start">
50
+ <div class="flex justify-center items-center gap-4">
51
+ <span>Items per page: </span>
52
+ <Slider v-model="rows3" @change="first3 = 0" :style="{ width: '10rem' }" :min="10" :max="120" :step="30" />
53
+ </div>
54
+ <Paginator v-model:first="first3" v-model:rows="rows3" :totalRecords="totalRecords" template="PrevPageLink PageLinks NextPageLink CurrentPageReport" currentPageReportTemplate="{first} - {last} of {totalRecords}" />
55
+ </div>
56
+ </div>
57
+ </template>
58
+
59
+ <script setup>
60
+ import { ref } from 'vue';
61
+ import Search from '@primeicons/vue/search';
62
+ import Star from '@primeicons/vue/star';
63
+
64
+ const first1 = ref(0);
65
+ const rows1 = ref(10);
66
+ const first2 = ref(0);
67
+ const rows2 = ref(10);
68
+ const first3 = ref(0);
69
+ const rows3 = ref(10);
70
+ const totalRecords = ref(120);
71
+ const options = ref([
72
+ { label: 5, value: 5 },
73
+ { label: 10, value: 10 },
74
+ { label: 20, value: 20 },
75
+ { label: 120, value: 120 }
76
+ ]);
77
+ <\/script>
78
+ ```
79
+
80
+ ## Current Page Report
81
+
82
+ Current page report item in the template displays information about the pagination state. Default value is ({currentPage} of {totalPages}) whereas available placeholders are the following; {currentPage} {totalPages} {rows} {first} {last} {totalRecords}
83
+
84
+ ```vue
85
+ <template>
86
+ <div class="flex justify-center">
87
+ <Paginator v-model:first="first" v-model:rows="rows" :totalRecords="120" template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink"
88
+ currentPageReportTemplate="Showing {first} to {last} of {totalRecords}" />
89
+ </div>
90
+ </template>
91
+
92
+ <script setup>
93
+ import { ref } from 'vue';
94
+
95
+ const first = ref(0);
96
+ const rows = ref(10);
97
+ <\/script>
98
+ ```
99
+
100
+ ## Images
101
+
102
+ Sample image gallery implementation using paginator.
103
+
104
+ ```vue
105
+ <template>
106
+ <div class="flex flex-col gap-4 justify-center items-center">
107
+ <Paginator v-model:first="first" v-model:rows="rows" :totalRecords="12" template="FirstPageLink PrevPageLink JumpToPageDropdown NextPageLink LastPageLink" />
108
+ <img :src="\`https://primefaces.org/cdn/primevue/images/nature/nature\${first + 1}.jpg\`" class="max-w-full rounded-xl" />
109
+ </div>
110
+ </template>
111
+
112
+ <script setup>
113
+ import { ref } from 'vue';
114
+
115
+ const first = ref(0);
116
+ const rows = ref(1);
117
+ <\/script>
118
+ ```
119
+
120
+ ## Accessibility
121
+
122
+ Screen Reader Paginator is placed inside a nav element to indicate a navigation section. All of the paginator elements can be customized using templating however the default behavious is listed below. First, previous, next and last page navigators elements with aria-label attributes referring to the aria.firstPageLabel , aria.prevPageLabel , aria.nextPageLabel and aria.lastPageLabel properties of the locale API respectively. Page links are also button elements with an aria-label attribute derived from the aria.pageLabel of the locale API. Current page is marked with aria-current set to "page" as well. Current page report uses aria-live="polite" to instruct screen reader about the changes to the pagination state. Rows per page dropdown internally uses a dropdown component, refer to the select documentation for accessibility details. Additionally, the dropdown uses an aria-label from the aria.rowsPerPageLabel property of the locale API. Jump to page input is an input element with an aria-label that refers to the aria.jumpToPageInputLabel property and jump to page dropdown internally uses a dropdown component, with an aria-label that refers to the aria.jumpToPageDropdownLabel property of the locale API. Keyboard Support Key Function tab Moves focus through the paginator elements. enter Executes the paginator element action. space Executes the paginator element action. Rows Per Page Dropdown Keyboard Support Refer to the select documentation for more details about keyboard support.
123
+
124
+ ## Paginator API
125
+
126
+ ### Props
127
+
128
+ | Name |Type |Default |Description |
129
+ | --- | --- | --- | --- |
130
+ | totalRecords | number | 0 | Number of total records. |
131
+ | rows | number | 0 | Data count to display per page. |
132
+ | first | number | 0 | Zero-relative number of the first row to be displayed. |
133
+ | pageLinkSize | number | 5 | Number of page links to display. |
134
+ | rowsPerPageOptions | number[] | - | Array of integer values to display inside rows per page dropdown. |
135
+ | template | any | - | Template of the paginator, can either be a string or an object with key-value pairs to define templates per breakpoint. Available templates are the following; - FirstPageLink - PrevPageLink - PageLinks - NextPageLink - LastPageLink - RowsPerPageDropdown - JumpToPageDropdown - JumpToPageInput - CurrentPageReport |
136
+ | currentPageReportTemplate | string | '({currentPage} of {totalPages})' | Template of the current page report element. It displays information about the pagination state. Available placeholders are the following; - {currentPage} - {totalPages} - {rows} - {first} - {last} - {totalRecords} |
137
+ | alwaysShow | boolean | true | Whether to show the paginator even there is only one page. |
138
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
139
+ | pt | PassThrough<PaginatorPassThroughOptions<any>> | - | Used to pass attributes to DOM elements inside the component. |
140
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
141
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
142
+
143
+ ### Pass Through Options
144
+
145
+ | Name |Type |Description |
146
+ | --- | --- | --- |
147
+ | paginatorContainer | any | Used to pass attributes to the paginator container's DOM element. |
148
+ | root | PaginatorPassThroughOptionType<T> | Used to pass attributes to the root's DOM element. |
149
+ | content | PaginatorPassThroughOptionType<T> | Used to pass attributes to the content DOM element. |
150
+ | contentStart | PaginatorPassThroughOptionType<T> | Used to pass attributes to the content start's DOM element. |
151
+ | first | PaginatorPassThroughOptionType<T> | Used to pass attributes to the first page button's DOM element. |
152
+ | firstIcon | PaginatorPassThroughOptionType<T> | Used to pass attributes to the first icon's DOM element. |
153
+ | prev | PaginatorPassThroughOptionType<T> | Used to pass attributes to the prev page button's DOM element. |
154
+ | prevIcon | PaginatorPassThroughOptionType<T> | Used to pass attributes to the prev page icon's DOM element. |
155
+ | next | PaginatorPassThroughOptionType<T> | Used to pass attributes to the next page button's DOM element. |
156
+ | nextIcon | PaginatorPassThroughOptionType<T> | Used to pass attributes to the next page icon's DOM element. |
157
+ | last | PaginatorPassThroughOptionType<T> | Used to pass attributes to the last page button's DOM element. |
158
+ | lastIcon | PaginatorPassThroughOptionType<T> | Used to pass attributes to the last page icon's DOM element. |
159
+ | pages | PaginatorPassThroughOptionType<T> | Used to pass attributes to the pages's DOM element. |
160
+ | page | PaginatorPassThroughOptionType<T> | Used to pass attributes to the page button's DOM element. |
161
+ | current | PaginatorPassThroughOptionType<T> | Used to pass attributes to the current's DOM element. |
162
+ | pcRowPerPageDropdown | any | Used to pass attributes to the Select component. |
163
+ | pcJumpToPageDropdown | any | Used to pass attributes to the Select component. |
164
+ | pcJumpToPageInputText | any | Used to pass attributes to the Dropdown component. |
165
+ | contentEnd | PaginatorPassThroughOptionType<T> | Used to pass attributes to the content end's DOM element. |
166
+ | hooks | any | Used to manage all lifecycle hooks. |
167
+
168
+ ### Theming
169
+
170
+ ### CSS Classes
171
+
172
+ | Class |Description |
173
+ | --- | --- |
174
+ | p-paginator | Class name of the paginator element |
175
+ | p-paginator-content-start | Class name of the content start element |
176
+ | p-paginator-content-end | Class name of the content end element |
177
+ | p-paginator-first | Class name of the first element |
178
+ | p-paginator-first-icon | Class name of the first icon element |
179
+ | p-paginator-prev | Class name of the prev element |
180
+ | p-paginator-prev-icon | Class name of the prev icon element |
181
+ | p-paginator-next | Class name of the next element |
182
+ | p-paginator-next-icon | Class name of the next icon element |
183
+ | p-paginator-last | Class name of the last element |
184
+ | p-paginator-last-icon | Class name of the last icon element |
185
+ | p-paginator-pages | Class name of the pages element |
186
+ | p-paginator-page | Class name of the page element |
187
+ | p-paginator-current | Class name of the current element |
188
+ | p-paginator-rpp-dropdown | Class name of the row per page dropdown element |
189
+ | p-paginator-jtp-dropdown | Class name of the jump to page dropdown element |
190
+ | p-paginator-jtp-input | Class name of the jump to page input element |
191
+
192
+ ### Design Tokens
193
+
194
+ | Token |CSS Variable |Description |
195
+ | --- | --- | --- |
196
+ | paginator.padding | --p-paginator-padding | Padding of root |
197
+ | paginator.gap | --p-paginator-gap | Gap of root |
198
+ | paginator.border.radius | --p-paginator-border-radius | Border radius of root |
199
+ | paginator.background | --p-paginator-background | Background of root |
200
+ | paginator.color | --p-paginator-color | Color of root |
201
+ | paginator.transition.duration | --p-paginator-transition-duration | Transition duration of root |
202
+ | paginator.nav.button.background | --p-paginator-nav-button-background | Background of nav button |
203
+ | paginator.nav.button.hover.background | --p-paginator-nav-button-hover-background | Hover background of nav button |
204
+ | paginator.nav.button.selected.background | --p-paginator-nav-button-selected-background | Selected background of nav button |
205
+ | paginator.nav.button.color | --p-paginator-nav-button-color | Color of nav button |
206
+ | paginator.nav.button.hover.color | --p-paginator-nav-button-hover-color | Hover color of nav button |
207
+ | paginator.nav.button.selected.color | --p-paginator-nav-button-selected-color | Selected color of nav button |
208
+ | paginator.nav.button.width | --p-paginator-nav-button-width | Width of nav button |
209
+ | paginator.nav.button.height | --p-paginator-nav-button-height | Height of nav button |
210
+ | paginator.nav.button.border.radius | --p-paginator-nav-button-border-radius | Border radius of nav button |
211
+ | paginator.nav.button.font.weight | --p-paginator-nav-button-font-weight | Font weight of nav button |
212
+ | paginator.nav.button.font.size | --p-paginator-nav-button-font-size | Font size of nav button |
213
+ | paginator.nav.button.focus.ring.width | --p-paginator-nav-button-focus-ring-width | Focus ring width of nav button |
214
+ | paginator.nav.button.focus.ring.style | --p-paginator-nav-button-focus-ring-style | Focus ring style of nav button |
215
+ | paginator.nav.button.focus.ring.color | --p-paginator-nav-button-focus-ring-color | Focus ring color of nav button |
216
+ | paginator.nav.button.focus.ring.offset | --p-paginator-nav-button-focus-ring-offset | Focus ring offset of nav button |
217
+ | paginator.nav.button.focus.ring.shadow | --p-paginator-nav-button-focus-ring-shadow | Focus ring shadow of nav button |
218
+ | paginator.current.page.report.color | --p-paginator-current-page-report-color | Color of current page report |
219
+ | paginator.current.page.report.font.weight | --p-paginator-current-page-report-font-weight | Font weight of current page report |
220
+ | paginator.current.page.report.font.size | --p-paginator-current-page-report-font-size | Font size of current page report |
221
+ | paginator.jump.to.page.input.max.width | --p-paginator-jump-to-page-input-max-width | Max width of jump to page input |
@@ -0,0 +1,321 @@
1
+ # Panel
2
+
3
+ Panel is a container component with an optional content toggle feature.
4
+
5
+ ## Basic
6
+
7
+ A simple Panel is created with a header property along with the content as children.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <Panel header="Order Summary" class="max-w-xs w-full">
13
+ <div class="flex flex-col text-sm">
14
+ <div class="flex justify-between">
15
+ <span class="text-muted-color">Wireless Headphones</span>
16
+ <span class="text-color font-medium">$79.00</span>
17
+ </div>
18
+ <div class="flex justify-between mt-3">
19
+ <span class="text-muted-color">Phone Case</span>
20
+ <span class="text-color font-medium">$15.00</span>
21
+ </div>
22
+ <div class="flex justify-between mt-3">
23
+ <span class="text-muted-color">Shipping</span>
24
+ <span class="text-color font-medium">$5.99</span>
25
+ </div>
26
+ <Divider />
27
+ <div class="flex justify-between">
28
+ <span class="text-color font-semibold">Total</span>
29
+ <span class="text-color font-semibold">$99.99</span>
30
+ </div>
31
+ </div>
32
+ </Panel>
33
+ </div>
34
+ </template>
35
+
36
+ <script setup>
37
+ import Divider from 'primevue/divider';
38
+ import Panel from 'primevue/panel';
39
+ <\/script>
40
+ ```
41
+
42
+ ## Toggleable
43
+
44
+ Content of the panel can be expanded and collapsed using the toggleable property.
45
+
46
+ ```vue
47
+ <template>
48
+ <div class="flex justify-center">
49
+ <Panel header="Order Summary" toggleable class="max-w-xs w-full">
50
+ <div class="flex flex-col text-sm">
51
+ <div class="flex justify-between">
52
+ <span class="text-muted-color">Wireless Headphones</span>
53
+ <span class="text-color font-medium">$79.00</span>
54
+ </div>
55
+ <div class="flex justify-between mt-3">
56
+ <span class="text-muted-color">Phone Case</span>
57
+ <span class="text-color font-medium">$15.00</span>
58
+ </div>
59
+ <div class="flex justify-between mt-3">
60
+ <span class="text-muted-color">Shipping</span>
61
+ <span class="text-color font-medium">$5.99</span>
62
+ </div>
63
+ <Divider />
64
+ <div class="flex justify-between">
65
+ <span class="text-color font-semibold">Total</span>
66
+ <span class="text-color font-semibold">$99.99</span>
67
+ </div>
68
+ </div>
69
+ </Panel>
70
+ </div>
71
+ </template>
72
+
73
+ <script setup>
74
+ import Divider from 'primevue/divider';
75
+ import Panel from 'primevue/panel';
76
+ <\/script>
77
+ ```
78
+
79
+ ## Controlled
80
+
81
+ The collapsed property with two-way binding controls the open state programmatically.
82
+
83
+ ```vue
84
+ <template>
85
+ <div class="flex justify-center">
86
+ <div class="space-y-4 max-w-xs w-full">
87
+ <div class="flex gap-2 justify-center">
88
+ <Button :severity="!collapsed ? 'primary' : 'secondary'" @click="collapsed = false">Open</Button>
89
+ <Button :severity="collapsed ? 'primary' : 'secondary'" @click="collapsed = true">Close</Button>
90
+ </div>
91
+ <Panel header="Order Summary" toggleable v-model:collapsed="collapsed">
92
+ <div class="flex flex-col text-sm">
93
+ <div class="flex justify-between">
94
+ <span class="text-muted-color">Wireless Headphones</span>
95
+ <span class="text-color font-medium">$79.00</span>
96
+ </div>
97
+ <div class="flex justify-between mt-3">
98
+ <span class="text-muted-color">Phone Case</span>
99
+ <span class="text-color font-medium">$15.00</span>
100
+ </div>
101
+ <div class="flex justify-between mt-3">
102
+ <span class="text-muted-color">Shipping</span>
103
+ <span class="text-color font-medium">$5.99</span>
104
+ </div>
105
+ <Divider />
106
+ <div class="flex justify-between">
107
+ <span class="text-color font-semibold">Total</span>
108
+ <span class="text-color font-semibold">$99.99</span>
109
+ </div>
110
+ </div>
111
+ </Panel>
112
+ </div>
113
+ </div>
114
+ </template>
115
+
116
+ <script setup>
117
+ import { ref } from 'vue';
118
+ import Button from 'primevue/button';
119
+ import Divider from 'primevue/divider';
120
+ import Panel from 'primevue/panel';
121
+
122
+ const collapsed = ref(false);
123
+ <\/script>
124
+ ```
125
+
126
+ ## Indicator
127
+
128
+ The toggleicon slot customizes the indicator. It can switch between two icons using the collapsed context variable, or render a single icon that animates purely with CSS by targeting the toggle button's aria-expanded state.
129
+
130
+ ```vue
131
+ <template>
132
+ <div class="flex flex-col gap-8 max-w-xs mx-auto">
133
+ <div>
134
+ <h3 class="text-sm! font-medium! text-surface-500! mb-2">Match open / closed</h3>
135
+ <Panel header="Order Summary" toggleable class="w-full">
136
+ <template #toggleicon="{ collapsed }">
137
+ <Plus v-if="collapsed" />
138
+ <Minus v-else />
139
+ </template>
140
+ <div class="flex flex-col text-sm">
141
+ <div class="flex justify-between">
142
+ <span class="text-muted-color">Wireless Headphones</span>
143
+ <span class="text-color font-medium">$79.00</span>
144
+ </div>
145
+ <div class="flex justify-between mt-3">
146
+ <span class="text-muted-color">Phone Case</span>
147
+ <span class="text-color font-medium">$15.00</span>
148
+ </div>
149
+ <div class="flex justify-between mt-3">
150
+ <span class="text-muted-color">Shipping</span>
151
+ <span class="text-color font-medium">$5.99</span>
152
+ </div>
153
+ <Divider />
154
+ <div class="flex justify-between">
155
+ <span class="text-color font-semibold">Total</span>
156
+ <span class="text-color font-semibold">$99.99</span>
157
+ </div>
158
+ </div>
159
+ </Panel>
160
+ </div>
161
+
162
+ <div>
163
+ <h3 class="text-sm! font-medium! text-surface-500! mb-2">CSS-only with data attributes</h3>
164
+ <Panel header="Order Summary" toggleable class="w-full">
165
+ <template #toggleicon>
166
+ <ChevronDown class="transition-transform duration-200 in-aria-expanded:rotate-180" />
167
+ </template>
168
+ <div class="flex flex-col text-sm">
169
+ <div class="flex justify-between">
170
+ <span class="text-muted-color">Wireless Headphones</span>
171
+ <span class="text-color font-medium">$79.00</span>
172
+ </div>
173
+ <div class="flex justify-between mt-3">
174
+ <span class="text-muted-color">Phone Case</span>
175
+ <span class="text-color font-medium">$15.00</span>
176
+ </div>
177
+ <div class="flex justify-between mt-3">
178
+ <span class="text-muted-color">Shipping</span>
179
+ <span class="text-color font-medium">$5.99</span>
180
+ </div>
181
+ <Divider />
182
+ <div class="flex justify-between">
183
+ <span class="text-color font-semibold">Total</span>
184
+ <span class="text-color font-semibold">$99.99</span>
185
+ </div>
186
+ </div>
187
+ </Panel>
188
+ </div>
189
+ </div>
190
+ </template>
191
+
192
+ <script setup>
193
+ import ChevronDown from '@primeicons/vue/chevron-down';
194
+ import Minus from '@primeicons/vue/minus';
195
+ import Plus from '@primeicons/vue/plus';
196
+ <\/script>
197
+ ```
198
+
199
+ ## Template
200
+
201
+ Header and footer sections can be customized using header and footer templates.
202
+
203
+ ```vue
204
+ <template>
205
+ <div class="flex justify-center">
206
+ <Panel toggleable class="max-w-xs w-full" :pt="{ header: 'p-4!' }">
207
+ <template #header>
208
+ <div class="flex items-center gap-2">
209
+ <Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
210
+ <span class="font-bold">Amy Elsner</span>
211
+ </div>
212
+ </template>
213
+ <template #icons>
214
+ <Button severity="secondary" rounded text>
215
+ <Cog />
216
+ </Button>
217
+ </template>
218
+ <template #toggleicon="{ collapsed }">
219
+ <ChevronDown :class="collapsed ? 'transition-transform duration-200' : 'transition-transform duration-200 rotate-180'" />
220
+ </template>
221
+ <template #footer>
222
+ <div class="flex flex-wrap items-center justify-between gap-4">
223
+ <div class="flex items-center gap-2">
224
+ <Button rounded text>
225
+ <User />
226
+ </Button>
227
+ <Button severity="secondary" rounded text>
228
+ <Bookmark />
229
+ </Button>
230
+ </div>
231
+ <span class="text-surface-500 dark:text-surface-400 text-sm">Updated 2 hours ago</span>
232
+ </div>
233
+ </template>
234
+ <p class="m-0 text-sm">
235
+ Product designer focused on accessible interfaces, scalable design systems and modern frontend workflows. Passionate about creating intuitive user experiences that balance usability, consistency and performance across platforms.
236
+ Currently exploring AI-assisted UI tooling, component architecture and developer experience improvements to streamline design-to-development collaboration and build more maintainable products.
237
+ </p>
238
+ </Panel>
239
+ </div>
240
+ </template>
241
+
242
+ <script setup>
243
+ import Bookmark from '@primeicons/vue/bookmark';
244
+ import ChevronDown from '@primeicons/vue/chevron-down';
245
+ import Cog from '@primeicons/vue/cog';
246
+ import User from '@primeicons/vue/user';
247
+ import Avatar from 'primevue/avatar';
248
+ import Button from 'primevue/button';
249
+ import Panel from 'primevue/panel';
250
+ <\/script>
251
+ ```
252
+
253
+ ## Accessibility
254
+
255
+ Screen Reader Toggleable panels use a content toggle button at the header that has aria-controls to define the id of the content section along with aria-expanded for the visibility state. The value to read the button defaults to the value of the header property and can be customized by defining an aria-label or aria-labelledby via the toggleButtonProps property. The content uses region , defines an id that matches the aria-controls of the content toggle button and aria-labelledby referring to the id of the header. Content Toggle Button Keyboard Support Key Function tab Moves focus to the next the focusable element in the page tab sequence. shift + tab Moves focus to the previous the focusable element in the page tab sequence. enter Toggles the visibility of the content. space Toggles the visibility of the content.
256
+
257
+ ## Panel API
258
+
259
+ ### Props
260
+
261
+ | Name |Type |Default |Description |
262
+ | --- | --- | --- | --- |
263
+ | header | string | - | Header text of the panel. |
264
+ | toggleable | boolean | false | Defines if content of panel can be expanded and collapsed. |
265
+ | collapsed | boolean | false | Defines the initial state of panel content. |
266
+ | toggleButtonProps | object | - | Used to pass the custom value to read for the button inside the component. |
267
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
268
+ | pt | PassThrough<PanelPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
269
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
270
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
271
+
272
+ ### Pass Through Options
273
+
274
+ | Name |Type |Description |
275
+ | --- | --- | --- |
276
+ | root | PanelPassThroughOptionType | Used to pass attributes to the root's DOM element. |
277
+ | header | PanelPassThroughOptionType | Used to pass attributes to the header's DOM element. |
278
+ | title | PanelPassThroughOptionType | Used to pass attributes to the title's DOM element. |
279
+ | headerActions | PanelPassThroughOptionType | Used to pass attributes to the header actions' DOM element. |
280
+ | pcToggleButton | any | Used to pass attributes to the toggle button button's DOM element. |
281
+ | contentContainer | PanelPassThroughOptionType | Used to pass attributes to the content container's DOM element. |
282
+ | contentWrapper | PanelPassThroughOptionType | Used to pass attributes to the content wrapper DOM element. |
283
+ | content | PanelPassThroughOptionType | Used to pass attributes to the content's DOM element. |
284
+ | footer | PanelPassThroughOptionType | Used to pass attributes to the footer's DOM element. |
285
+ | transition | PanelPassThroughTransitionType | Used to control Vue Transition API. |
286
+ | hooks | any | Used to manage all lifecycle hooks. |
287
+
288
+ ### Theming
289
+
290
+ ### CSS Classes
291
+
292
+ | Class |Description |
293
+ | --- | --- |
294
+ | p-panel | Class name of the root element |
295
+ | p-panel-header | Class name of the header element |
296
+ | p-panel-title | Class name of the title element |
297
+ | p-panel-header-actions | Class name of the header actions element |
298
+ | p-panel-toggle-button | Class name of the toggle button element |
299
+ | p-panel-content-container | Class name of the content container element |
300
+ | p-panel-content | Class name of the content element |
301
+ | p-panel-footer | Class name of the footer element |
302
+
303
+ ### Design Tokens
304
+
305
+ | Token |CSS Variable |Description |
306
+ | --- | --- | --- |
307
+ | panel.background | --p-panel-background | Background of root |
308
+ | panel.border.color | --p-panel-border-color | Border color of root |
309
+ | panel.color | --p-panel-color | Color of root |
310
+ | panel.border.radius | --p-panel-border-radius | Border radius of root |
311
+ | panel.header.background | --p-panel-header-background | Background of header |
312
+ | panel.header.color | --p-panel-header-color | Color of header |
313
+ | panel.header.padding | --p-panel-header-padding | Padding of header |
314
+ | panel.header.border.color | --p-panel-header-border-color | Border color of header |
315
+ | panel.header.border.width | --p-panel-header-border-width | Border width of header |
316
+ | panel.header.border.radius | --p-panel-header-border-radius | Border radius of header |
317
+ | panel.toggleable.header.padding | --p-panel-toggleable-header-padding | Padding of toggleable header |
318
+ | panel.title.font.weight | --p-panel-title-font-weight | Font weight of title |
319
+ | panel.title.font.size | --p-panel-title-font-size | Font size of title |
320
+ | panel.content.padding | --p-panel-content-padding | Padding of content |
321
+ | panel.footer.padding | --p-panel-footer-padding | Padding of footer |