@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,447 @@
1
+ # Splitter
2
+
3
+ Splitter is utilized to separate and resize panels.
4
+
5
+ ## Basic
6
+
7
+ Divides a layout into resizable panels with a draggable divider.
8
+
9
+ ```vue
10
+ <template>
11
+ <div>
12
+ <Splitter class="h-60! max-w-lg mx-auto">
13
+ <SplitterPanel class="flex items-center justify-center">
14
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
15
+ </SplitterPanel>
16
+ <SplitterPanel class="flex items-center justify-center">
17
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
18
+ </SplitterPanel>
19
+ </Splitter>
20
+ </div>
21
+ </template>
22
+ ```
23
+
24
+ ## Vertical
25
+
26
+ Panels are stacked when layout is set to vertical .
27
+
28
+ ```vue
29
+ <template>
30
+ <div>
31
+ <Splitter layout="vertical" class="h-60! max-w-lg mx-auto">
32
+ <SplitterPanel class="flex items-center justify-center">
33
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
34
+ </SplitterPanel>
35
+ <SplitterPanel class="flex items-center justify-center">
36
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
37
+ </SplitterPanel>
38
+ </Splitter>
39
+ </div>
40
+ </template>
41
+ ```
42
+
43
+ ## Size
44
+
45
+ Initial dimensions are percentage based and provided through sizes on Splitter. Per-panel constraints are configured with minSize and maxSize .
46
+
47
+ ```vue
48
+ <template>
49
+ <div>
50
+ <Splitter :sizes="[25, 75]" class="h-60! max-w-lg mx-auto">
51
+ <SplitterPanel :minSize="10" class="flex items-center justify-center">
52
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
53
+ </SplitterPanel>
54
+ <SplitterPanel class="flex items-center justify-center">
55
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
56
+ </SplitterPanel>
57
+ </Splitter>
58
+ </div>
59
+ </template>
60
+ ```
61
+
62
+ ## Min Max Size
63
+
64
+ Each panel can declare a minSize and a maxSize in percentages. The splitter ensures the panel cannot shrink below minSize nor grow beyond maxSize during a resize.
65
+
66
+ ```vue
67
+ <template>
68
+ <div class="flex flex-col items-center gap-8 max-w-lg mx-auto">
69
+ <Splitter class="w-full h-32!">
70
+ <SplitterPanel :minSize="20" :maxSize="50" class="flex items-center justify-center">
71
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
72
+ </SplitterPanel>
73
+ <SplitterPanel class="flex items-center justify-center">
74
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
75
+ </SplitterPanel>
76
+ </Splitter>
77
+
78
+ <Splitter class="w-full h-32!">
79
+ <SplitterPanel :minSize="10" class="flex items-center justify-center">
80
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
81
+ </SplitterPanel>
82
+ <SplitterPanel :minSize="10" class="flex items-center justify-center">
83
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
84
+ </SplitterPanel>
85
+ <SplitterPanel :minSize="10" class="flex items-center justify-center">
86
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">3</span>
87
+ </SplitterPanel>
88
+ </Splitter>
89
+ </div>
90
+ </template>
91
+ ```
92
+
93
+ ## Collapsible
94
+
95
+ Adding collapsible to a panel allows it to snap to collapsedSize (default 0% ) once it is dragged past the halfway point between collapsedSize and minSize . Keyboard resize collapses immediately when the panel reaches minSize .
96
+
97
+ ```vue
98
+ <template>
99
+ <div class="flex flex-col items-center gap-8 max-w-lg mx-auto">
100
+ <Splitter class="w-full h-32">
101
+ <SplitterPanel :minSize="10" collapsible class="flex items-center justify-center">
102
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
103
+ </SplitterPanel>
104
+ <SplitterPanel class="flex items-center justify-center">
105
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
106
+ </SplitterPanel>
107
+ </Splitter>
108
+
109
+ <Splitter class="w-full h-32">
110
+ <SplitterPanel :minSize="20" :collapsedSize="5" collapsible class="flex items-center justify-center">
111
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
112
+ </SplitterPanel>
113
+ <SplitterPanel :minSize="10" class="flex items-center justify-center">
114
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
115
+ </SplitterPanel>
116
+ </Splitter>
117
+ </div>
118
+ </template>
119
+ ```
120
+
121
+ ## Nested
122
+
123
+ Splitters can be nested by placing another Splitter inside a SplitterPanel.
124
+
125
+ ```vue
126
+ <template>
127
+ <div>
128
+ <Splitter :sizes="[25, 75]" class="h-80 w-full max-w-lg mx-auto">
129
+ <SplitterPanel :minSize="10" class="flex items-center justify-center">
130
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
131
+ </SplitterPanel>
132
+ <SplitterPanel>
133
+ <Splitter :sizes="[50, 50]" layout="vertical">
134
+ <SplitterPanel class="flex items-center justify-center">
135
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
136
+ </SplitterPanel>
137
+ <SplitterPanel>
138
+ <Splitter :sizes="[20, 80]">
139
+ <SplitterPanel class="flex items-center justify-center">
140
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">3</span>
141
+ </SplitterPanel>
142
+ <SplitterPanel class="flex items-center justify-center">
143
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">4</span>
144
+ </SplitterPanel>
145
+ </Splitter>
146
+ </SplitterPanel>
147
+ </Splitter>
148
+ </SplitterPanel>
149
+ </Splitter>
150
+ </div>
151
+ </template>
152
+ ```
153
+
154
+ ## Resize Events
155
+
156
+ Splitter emits resizestart , resize , and resizeend while a gutter is being dragged, and collapse whenever a collapsible panel snaps to or out of collapsedSize . Every event carries the current sizes.
157
+
158
+ ```vue
159
+ <template>
160
+ <div class="flex flex-col items-center gap-4 max-w-lg mx-auto">
161
+ <div class="flex flex-col items-center gap-1 w-full text-sm font-mono text-surface-500">
162
+ <div>onResizeStart: [{{ format(resizeStart) }}]</div>
163
+ <div>onResize: [{{ format(resize) }}]</div>
164
+ <div>onResizeEnd: [{{ format(resizeEnd) }}]</div>
165
+ <div>onCollapse: {{ collapseLabel }}</div>
166
+ </div>
167
+
168
+ <Splitter
169
+ class="w-full h-60!"
170
+ @resizestart="(e) => (resizeStart = e.sizes)"
171
+ @resize="(e) => (resize = e.sizes)"
172
+ @resizeend="(e) => (resizeEnd = e.sizes)"
173
+ @collapse="(e) => (collapseEvent = e)"
174
+ >
175
+ <SplitterPanel :minSize="15" collapsible class="flex items-center justify-center">
176
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
177
+ </SplitterPanel>
178
+ <SplitterPanel :minSize="25" collapsible class="flex items-center justify-center">
179
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
180
+ </SplitterPanel>
181
+ </Splitter>
182
+ </div>
183
+ </template>
184
+
185
+ <script setup>
186
+ import { computed, ref } from 'vue';
187
+
188
+ const resizeStart = ref([50, 50]);
189
+ const resize = ref([50, 50]);
190
+ const resizeEnd = ref([50, 50]);
191
+ const collapseEvent = ref(null);
192
+
193
+ const format = (sizes) => sizes.map((s) => s.toFixed(1) + '%').join(', ');
194
+
195
+ const collapseLabel = computed(() => {
196
+ if (!collapseEvent.value) return '–';
197
+
198
+ return \`Panel \${collapseEvent.value.index} \${collapseEvent.value.collapsed ? 'collapsed' : 'expanded'} [\${format(collapseEvent.value.sizes)}]\`;
199
+ });
200
+ <\/script>
201
+ ```
202
+
203
+ ## Stateful
204
+
205
+ Binding the panel sizes with v-model:sizes turns the Splitter into a controlled component. Persisting the bound state to localStorage keeps the layout across page reloads. The built-in stateKey / stateStorage pair offers the same persistence without manual bookkeeping.
206
+
207
+ ```vue
208
+ <template>
209
+ <div>
210
+ <Splitter v-model:sizes="sizes" class="h-60! max-w-lg mx-auto" @resizeend="persist">
211
+ <SplitterPanel :minSize="10" class="flex items-center justify-center gap-2">
212
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
213
+ <span class="text-sm text-muted-color tabular-nums">({{ sizes[0].toFixed(1) }}%)</span>
214
+ </SplitterPanel>
215
+ <SplitterPanel :minSize="10" class="flex items-center justify-center gap-2">
216
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
217
+ <span class="text-sm text-muted-color tabular-nums">({{ sizes[1].toFixed(1) }}%)</span>
218
+ </SplitterPanel>
219
+ </Splitter>
220
+ </div>
221
+ </template>
222
+
223
+ <script setup>
224
+ import { onMounted, ref } from 'vue';
225
+
226
+ const STORAGE_KEY = 'splitter-demo-sizes';
227
+ const sizes = ref([30, 70]);
228
+
229
+ onMounted(() => {
230
+ const cached = localStorage.getItem(STORAGE_KEY);
231
+
232
+ if (cached) sizes.value = JSON.parse(cached);
233
+ });
234
+
235
+ const persist = (event) => {
236
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(event.sizes));
237
+ };
238
+ <\/script>
239
+ ```
240
+
241
+ ## Disabled
242
+
243
+ When disabled is present on the splitter, every gutter becomes non-interactive. The splitter is rendered with data-disabled , which the theme uses to fade the gutter and turn off pointer interactions.
244
+
245
+ ```vue
246
+ <template>
247
+ <div class="flex flex-col items-center gap-8 max-w-lg mx-auto">
248
+ <Splitter class="w-full h-32" disabled>
249
+ <SplitterPanel class="flex items-center justify-center">
250
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">1</span>
251
+ </SplitterPanel>
252
+ <SplitterPanel class="flex items-center justify-center">
253
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">2</span>
254
+ </SplitterPanel>
255
+ <SplitterPanel class="flex items-center justify-center">
256
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-surface-100 dark:bg-surface-800 text-color">3</span>
257
+ </SplitterPanel>
258
+ </Splitter>
259
+ </div>
260
+ </template>
261
+ ```
262
+
263
+ ## Custom
264
+
265
+ The default appearance is fully overridable through Tailwind utilities on the panels and the pt API on the gutter. Below, panels become colored badge containers and the gutter is rendered as a thin rounded bar.
266
+
267
+ ```vue
268
+ <template>
269
+ <div>
270
+ <Splitter
271
+ class="h-60! max-w-lg mx-auto border-none! gap-0.5! bg-transparent!"
272
+ :pt="{
273
+ gutter: { class: 'w-1.5! rounded-xs!' }
274
+ }"
275
+ >
276
+ <SplitterPanel class="flex items-center justify-center border border-blue-500 bg-blue-500/10 rounded-sm text-blue-500">
277
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-current/20">1</span>
278
+ </SplitterPanel>
279
+ <SplitterPanel class="flex items-center justify-center border border-purple-500 bg-purple-500/10 rounded-sm text-purple-500">
280
+ <span class="px-2.5 py-1 rounded-md font-mono font-bold bg-current/20">2</span>
281
+ </SplitterPanel>
282
+ </Splitter>
283
+ </div>
284
+ </template>
285
+ ```
286
+
287
+ ## Advanced
288
+
289
+ A real-world layout combining a collapsible navigation pane, a custom gutter handle and a viewport that adapts to the current sizes. The pane switches to a compact list once its width drops below 28%.
290
+
291
+ ```vue
292
+ <template>
293
+ <div>
294
+ <Splitter
295
+ v-model:sizes="sizes"
296
+ class="h-150!"
297
+ :pt="{
298
+ gutterHandle: { class: 'absolute! inset-y-0! h-full! rounded-none w-2! left-1/2! -translate-x-1/2! bg-surface-200! dark:bg-surface-700! hover:opacity-100! data-[resizing]:opacity-100! opacity-0! transition-opacity! delay-100!' },
299
+ gutter: { class: 'relative!' }
300
+ }"
301
+ @resizeend="(e) => (sizes = e.sizes)"
302
+ >
303
+ <SplitterPanel :minSize="20" collapsible>
304
+ <ul class="list-none m-0 p-0 w-full">
305
+ <li
306
+ v-for="(mail, i) in mails"
307
+ :key="i"
308
+ :class="[ 'px-4 py-3 cursor-pointer border-b border-surface-100 dark:border-surface-800 transition-colors', selected === i ? 'bg-primary-50 dark:bg-primary-950' : 'hover:bg-surface-50 dark:hover:bg-surface-800' ]"
309
+ @click="selected = i"
310
+ >
311
+ <div class="flex items-center justify-between gap-2">
312
+ <span class="font-semibold text-surface-900 dark:text-surface-0 text-sm truncate">{{ mail.name }}</span>
313
+ <span class="text-surface-400 text-xs shrink-0">{{ mail.time }}</span>
314
+ </div>
315
+ <template v-if="!isCompact">
316
+ <div class="text-surface-700 dark:text-surface-200 text-sm font-medium mt-1 mb-1">{{ mail.title }}</div>
317
+ <div class="text-surface-400 dark:text-surface-500 text-xs line-clamp-1">{{ mail.description }}</div>
318
+ </template>
319
+ </li>
320
+ </ul>
321
+ </SplitterPanel>
322
+ <SplitterPanel :minSize="30">
323
+ <div class="p-6">
324
+ <div class="flex items-start justify-between gap-4 mb-2">
325
+ <h2 class="text-lg font-semibold text-surface-900 dark:text-surface-0 m-0!">{{ mails[selected].title }}</h2>
326
+ <span class="text-surface-400 text-xs shrink-0 pt-1">{{ mails[selected].time }}</span>
327
+ </div>
328
+ <span class="text-surface-400 text-sm">{{ mails[selected].name }}</span>
329
+ <p class="text-surface-600 dark:text-surface-300 text-sm leading-relaxed mt-4 m-0!">{{ mails[selected].description }}</p>
330
+ </div>
331
+ </SplitterPanel>
332
+ </Splitter>
333
+ </div>
334
+ </template>
335
+
336
+ <script setup>
337
+ import { computed, ref } from 'vue';
338
+
339
+ const selected = ref(0);
340
+ const sizes = ref([35, 65]);
341
+ const isCompact = computed(() => sizes.value[0] < 28);
342
+
343
+ const mails = [
344
+ { name: 'Amy Elsner', title: 'Q1 Marketing Report', description: "Hi team, I've attached the Q1 marketing report. Please review the campaign metrics and share your feedback before our meeting on Friday.", time: '10:24 AM' },
345
+ { name: 'Bernardo Dominic', title: 'Design System Update', description: "The new design tokens are ready for review. I've updated the color palette and typography scale based on our last discussion.", time: '9:15 AM' },
346
+ { name: 'Ioni Bowcher', title: 'Sprint Retrospective Notes', description: "Here are the notes from yesterday's retro. Key takeaways: improve code review turnaround and schedule more pair programming sessions.", time: 'Yesterday' },
347
+ { name: 'Stephen Shaw', title: 'Server Migration Plan', description: 'The migration to the new cloud infrastructure is scheduled for next weekend. Please ensure all services have proper health checks configured.', time: 'Yesterday' },
348
+ { name: 'Elwin Sharvill', title: 'New Component Library Release', description: 'Version 4.0 of the component library is now available. Major changes include accessibility improvements and new theming capabilities.', time: 'Monday' }
349
+ ];
350
+ <\/script>
351
+ ```
352
+
353
+ ## Accessibility
354
+
355
+ Screen Reader Splitter gutter defines separator as the role with aria-orientation set to either horizontal or vertical. Each gutter provides aria-valuenow , aria-valuemin , and aria-valuemax to communicate panel sizes. Adjacent panels are linked via aria-controls . Keyboard Support Key Function tab Moves focus through the splitter bar. down arrow Moves a vertical splitter down. up arrow Moves a vertical splitter up. left arrow Moves a horizontal splitter to the left. right arrow Moves a horizontal splitter to the right.
356
+
357
+ ## Splitter API
358
+
359
+ ### Props
360
+
361
+ | Name |Type |Default |Description |
362
+ | --- | --- | --- | --- |
363
+ | layout | HintedString<"horizontal" \| "vertical"> | horizontal | Orientation of the panels. |
364
+ | gutterSize | number | 4 | Size of the divider in pixels. |
365
+ | stateKey | string | - | Storage identifier of a stateful Splitter. |
366
+ | stateStorage | HintedString<"session" \| "local"> | session | Defines where a stateful splitter keeps its state, valid values are 'session' for sessionStorage and 'local' for localStorage. |
367
+ | step | number | 5 | Step factor to increment/decrement the size of the panels while pressing the arrow keys. |
368
+ | disabled | boolean | false | When present, it disables the component and prevents resizing. |
369
+ | sizes | number[] | - | Sizes of the panels as percentages. When provided, makes the component controlled via `v-model:sizes` . |
370
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
371
+ | pt | PassThrough<SplitterPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
372
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
373
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
374
+
375
+ ### Pass Through Options
376
+
377
+ | Name |Type |Description |
378
+ | --- | --- | --- |
379
+ | root | SplitterPassThroughOptionType | Used to pass attributes to the root's DOM element. |
380
+ | gutter | SplitterPassThroughOptionType | Used to pass attributes to the gutter's DOM element. |
381
+ | gutterHandle | SplitterPassThroughOptionType | Used to pass attributes to the gutter handle's DOM element. |
382
+ | hooks | any | Used to manage all lifecycle hooks. |
383
+
384
+ ### Theming
385
+
386
+ ### CSS Classes
387
+
388
+ | Class |Description |
389
+ | --- | --- |
390
+ | p-splitter | Class name of the root element |
391
+ | p-splitter-gutter | Class name of the gutter element |
392
+ | p-splitter-gutter-handle | Class name of the gutter handle element |
393
+
394
+ ### Design Tokens
395
+
396
+ | Token |CSS Variable |Description |
397
+ | --- | --- | --- |
398
+ | splitter.background | --p-splitter-background | Background of root |
399
+ | splitter.border.color | --p-splitter-border-color | Border color of root |
400
+ | splitter.color | --p-splitter-color | Color of root |
401
+ | splitter.transition.duration | --p-splitter-transition-duration | Transition duration of root |
402
+ | splitter.gutter.background | --p-splitter-gutter-background | Background of gutter |
403
+ | splitter.handle.size | --p-splitter-handle-size | Size of handle |
404
+ | splitter.handle.background | --p-splitter-handle-background | Background of handle |
405
+ | splitter.handle.border.radius | --p-splitter-handle-border-radius | Border radius of handle |
406
+ | splitter.handle.focus.ring.width | --p-splitter-handle-focus-ring-width | Focus ring width of handle |
407
+ | splitter.handle.focus.ring.style | --p-splitter-handle-focus-ring-style | Focus ring style of handle |
408
+ | splitter.handle.focus.ring.color | --p-splitter-handle-focus-ring-color | Focus ring color of handle |
409
+ | splitter.handle.focus.ring.offset | --p-splitter-handle-focus-ring-offset | Focus ring offset of handle |
410
+ | splitter.handle.focus.ring.shadow | --p-splitter-handle-focus-ring-shadow | Focus ring shadow of handle |
411
+
412
+ ## Splitter Panel API
413
+
414
+ ### Props
415
+
416
+ | Name |Type |Default |Description |
417
+ | --- | --- | --- | --- |
418
+ | size | number | - | Size of the element relative to 100%. |
419
+ | minSize | number | 0 | Minimum size of the element relative to 100%. |
420
+ | maxSize | number | 100 | Maximum size of the element relative to 100%. |
421
+ | collapsible | boolean | false | When enabled, the panel can collapse below `minSize` to `collapsedSize` . |
422
+ | collapsedSize | number | 0 | Size of the panel when collapsed, relative to 100%. |
423
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
424
+ | pt | PassThrough<SplitterPanelPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
425
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
426
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
427
+
428
+ ### Slots
429
+
430
+ | Name |Parameters |Description |
431
+ | --- | --- | --- |
432
+ | default | Function | |
433
+
434
+ ### Pass Through Options
435
+
436
+ | Name |Type |Description |
437
+ | --- | --- | --- |
438
+ | root | SplitterPanelPassThroughOptionType | Used to pass attributes to the root's DOM element. |
439
+ | hooks | any | Used to manage all lifecycle hooks. |
440
+
441
+ ### Theming
442
+
443
+ ### CSS Classes
444
+
445
+ | Class |Description |
446
+ | --- | --- |
447
+ | p-splitter-panel | Class name of the root element |