@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,869 @@
1
+ # InputColor
2
+
3
+ InputColor is a composable color picker component.
4
+
5
+ ## Basic
6
+
7
+ InputColor is a composable color picker with area, slider, swatch, and input sub-components.
8
+
9
+ ```vue
10
+ <template>
11
+ <div class="flex justify-center">
12
+ <div class="max-w-xs mx-auto space-y-3 w-xs">
13
+ <InputColor v-model="value" :format="format === 'hex' ? 'rgba' : format">
14
+ <InputColorArea>
15
+ <InputColorAreaBackground />
16
+ <InputColorAreaHandle />
17
+ </InputColorArea>
18
+ <div class="flex items-center gap-2">
19
+ <div class="flex-1 space-y-1 mr-1">
20
+ <InputColorSlider>
21
+ <InputColorTransparencyGrid />
22
+ <InputColorSliderTrack />
23
+ <InputColorSliderHandle />
24
+ </InputColorSlider>
25
+ <InputColorSlider channel="alpha">
26
+ <InputColorTransparencyGrid />
27
+ <InputColorSliderTrack />
28
+ <InputColorSliderHandle />
29
+ </InputColorSlider>
30
+ </div>
31
+ <div class="flex items-center gap-2">
32
+ <InputColorSwatch>
33
+ <InputColorTransparencyGrid />
34
+ <InputColorSwatchBackground />
35
+ </InputColorSwatch>
36
+ <InputColorEyeDropper severity="secondary" variant="outlined">
37
+ <template #icon>
38
+ <EyeDropper />
39
+ </template>
40
+ </InputColorEyeDropper>
41
+ </div>
42
+ </div>
43
+ <div class="flex items-center gap-2">
44
+ <Select v-model="format" :options="formatOptions" optionLabel="label" optionValue="value" class="w-full md:w-26" />
45
+ <div class="flex-1">
46
+ <InputGroup>
47
+ <InputColorInput v-if="format === 'hex'" fluid channel="hex" />
48
+ <InputColorInput v-else-if="format === 'oklcha'" fluid channel="css" />
49
+ <template v-else-if="format === 'rgba'">
50
+ <InputColorInput fluid channel="red" />
51
+ <InputColorInput fluid channel="green" />
52
+ <InputColorInput fluid channel="blue" />
53
+ <InputColorInput fluid channel="alpha" />
54
+ </template>
55
+ <template v-else-if="format === 'hsba'">
56
+ <InputColorInput fluid channel="hue" />
57
+ <InputColorInput fluid channel="saturation" />
58
+ <InputColorInput fluid channel="brightness" />
59
+ <InputColorInput fluid channel="alpha" />
60
+ </template>
61
+ <template v-else-if="format === 'hsla'">
62
+ <InputColorInput fluid channel="hue" />
63
+ <InputColorInput fluid channel="saturation" />
64
+ <InputColorInput fluid channel="lightness" />
65
+ <InputColorInput fluid channel="alpha" />
66
+ </template>
67
+ </InputGroup>
68
+ </div>
69
+ </div>
70
+ </InputColor>
71
+ </div>
72
+ </div>
73
+ </template>
74
+
75
+ <script setup>
76
+ import EyeDropper from '@primeicons/vue/eye-dropper';
77
+ import { ref } from 'vue';
78
+
79
+ const value = ref('#276def');
80
+ const format = ref('hex');
81
+ const formatOptions = [
82
+ { label: 'HEX', value: 'hex' },
83
+ { label: 'RGBA', value: 'rgba' },
84
+ { label: 'HSBA', value: 'hsba' },
85
+ { label: 'HSLA', value: 'hsla' },
86
+ { label: 'OKLCHA', value: 'oklcha' }
87
+ ];
88
+ <\/script>
89
+ ```
90
+
91
+ ## With Popover
92
+
93
+ InputColor can be used inside a Popover, with a color swatch as the trigger.
94
+
95
+ ```vue
96
+ <template>
97
+ <div class="flex items-center justify-center">
98
+ <InputColor v-model="value">
99
+ <InputColorSwatch @click="(e) => op.toggle(e)" style="cursor: pointer">
100
+ <InputColorTransparencyGrid />
101
+ <InputColorSwatchBackground />
102
+ </InputColorSwatch>
103
+ <Popover ref="op">
104
+ <div class="w-72 p-3 space-y-3">
105
+ <InputColorArea>
106
+ <InputColorAreaBackground />
107
+ <InputColorAreaHandle />
108
+ </InputColorArea>
109
+ <InputColorSlider>
110
+ <InputColorTransparencyGrid />
111
+ <InputColorSliderTrack />
112
+ <InputColorSliderHandle />
113
+ </InputColorSlider>
114
+ <InputColorSlider channel="alpha">
115
+ <InputColorTransparencyGrid />
116
+ <InputColorSliderTrack />
117
+ <InputColorSliderHandle />
118
+ </InputColorSlider>
119
+ <div class="flex items-center gap-2">
120
+ <InputColorInput channel="hex" class="flex-1" />
121
+ <InputColorEyeDropper iconOnly severity="secondary" variant="outlined">
122
+ <template #icon>
123
+ <EyeDropper />
124
+ </template>
125
+ </InputColorEyeDropper>
126
+ </div>
127
+ </div>
128
+ </Popover>
129
+ </InputColor>
130
+ </div>
131
+ </template>
132
+
133
+ <script setup>
134
+ import EyeDropper from '@primeicons/vue/eye-dropper';
135
+ import { ref } from 'vue';
136
+
137
+ const value = ref('#0099ff');
138
+ const op = ref(null);
139
+ <\/script>
140
+ ```
141
+
142
+ ## Vertical Slider
143
+
144
+ Sliders support vertical orientation, displayed alongside the color area.
145
+
146
+ ```vue
147
+ <template>
148
+ <div class="flex items-center justify-center">
149
+ <InputColor v-model="value" format="hsba">
150
+ <div class="flex gap-4 max-w-md w-full mx-auto">
151
+ <InputColorArea class="flex-1">
152
+ <InputColorAreaBackground />
153
+ <InputColorAreaHandle />
154
+ </InputColorArea>
155
+ <InputColorSlider orientation="vertical">
156
+ <InputColorTransparencyGrid />
157
+ <InputColorSliderTrack />
158
+ <InputColorSliderHandle />
159
+ </InputColorSlider>
160
+ <InputColorSlider channel="saturation" orientation="vertical">
161
+ <InputColorTransparencyGrid />
162
+ <InputColorSliderTrack />
163
+ <InputColorSliderHandle />
164
+ </InputColorSlider>
165
+ <InputColorSlider channel="brightness" orientation="vertical">
166
+ <InputColorTransparencyGrid />
167
+ <InputColorSliderTrack />
168
+ <InputColorSliderHandle />
169
+ </InputColorSlider>
170
+ <InputColorSlider channel="alpha" orientation="vertical">
171
+ <InputColorTransparencyGrid />
172
+ <InputColorSliderTrack />
173
+ <InputColorSliderHandle />
174
+ </InputColorSlider>
175
+ </div>
176
+ </InputColor>
177
+ </div>
178
+ </template>
179
+
180
+ <script setup>
181
+ import { ref } from 'vue';
182
+
183
+ const value = ref('');
184
+ <\/script>
185
+ ```
186
+
187
+ ## Controlled
188
+
189
+ Demonstrates tracking color value changes during interaction and when interaction ends.
190
+
191
+ ```vue
192
+ <template>
193
+ <div class="flex justify-center">
194
+ <div class="max-w-xs mx-auto space-y-3 w-xs">
195
+ <div class="text-center font-mono text-sm text-surface-500">onValueChange: {{ value }}</div>
196
+ <div class="text-center font-mono text-sm text-surface-500">onValueChangeEnd: {{ endValue }}</div>
197
+ <InputColor v-model="value" @value-change="onValueChange" @value-change-end="onValueChangeEnd">
198
+ <InputColorArea>
199
+ <InputColorAreaBackground />
200
+ <InputColorAreaHandle />
201
+ </InputColorArea>
202
+ <div class="flex items-center gap-2">
203
+ <div class="flex-1 space-y-1 mr-1">
204
+ <InputColorSlider>
205
+ <InputColorTransparencyGrid />
206
+ <InputColorSliderTrack />
207
+ <InputColorSliderHandle />
208
+ </InputColorSlider>
209
+ <InputColorSlider channel="alpha">
210
+ <InputColorTransparencyGrid />
211
+ <InputColorSliderTrack />
212
+ <InputColorSliderHandle />
213
+ </InputColorSlider>
214
+ </div>
215
+ <InputColorSwatch>
216
+ <InputColorTransparencyGrid />
217
+ <InputColorSwatchBackground />
218
+ </InputColorSwatch>
219
+ <InputColorEyeDropper severity="secondary" variant="outlined">
220
+ <template #icon>
221
+ <EyeDropper />
222
+ </template>
223
+ </InputColorEyeDropper>
224
+ </div>
225
+ <InputColorInput fluid channel="hex" />
226
+ </InputColor>
227
+ </div>
228
+ </div>
229
+ </template>
230
+
231
+ <script setup>
232
+ import EyeDropper from '@primeicons/vue/eye-dropper';
233
+ import { ref } from 'vue';
234
+
235
+ const value = ref('#000000');
236
+ const endValue = ref('#000000');
237
+
238
+ const onValueChange = (event) => {
239
+ value.value = event.color;
240
+ };
241
+
242
+ const onValueChangeEnd = (event) => {
243
+ endValue.value = event.color;
244
+ };
245
+ <\/script>
246
+ ```
247
+
248
+ ## Advanced
249
+
250
+ Advanced color picker with per-format channel sliders, input groups for RGBA, HSBA, HSLA, OKLCH channels, and a CSS output.
251
+
252
+ ```vue
253
+ <template>
254
+ <div class="flex justify-center">
255
+ <div class="max-w-xs mx-auto space-y-3">
256
+ <Select v-model="format" :options="formatOptions" optionLabel="label" optionValue="value" fluid />
257
+ <InputColor v-model="value" :format="format">
258
+ <InputColorArea>
259
+ <InputColorAreaBackground />
260
+ <InputColorAreaHandle />
261
+ </InputColorArea>
262
+ <InputColorSlider>
263
+ <InputColorTransparencyGrid />
264
+ <InputColorSliderTrack />
265
+ <InputColorSliderHandle />
266
+ </InputColorSlider>
267
+ <template v-if="format === 'rgba'">
268
+ <InputColorSlider channel="red">
269
+ <InputColorTransparencyGrid />
270
+ <InputColorSliderTrack />
271
+ <InputColorSliderHandle />
272
+ </InputColorSlider>
273
+ <InputColorSlider channel="green">
274
+ <InputColorTransparencyGrid />
275
+ <InputColorSliderTrack />
276
+ <InputColorSliderHandle />
277
+ </InputColorSlider>
278
+ <InputColorSlider channel="blue">
279
+ <InputColorTransparencyGrid />
280
+ <InputColorSliderTrack />
281
+ <InputColorSliderHandle />
282
+ </InputColorSlider>
283
+ </template>
284
+ <template v-else-if="format === 'hsba'">
285
+ <InputColorSlider channel="saturation">
286
+ <InputColorTransparencyGrid />
287
+ <InputColorSliderTrack />
288
+ <InputColorSliderHandle />
289
+ </InputColorSlider>
290
+ <InputColorSlider channel="brightness">
291
+ <InputColorTransparencyGrid />
292
+ <InputColorSliderTrack />
293
+ <InputColorSliderHandle />
294
+ </InputColorSlider>
295
+ </template>
296
+ <template v-else-if="format === 'hsla'">
297
+ <InputColorSlider channel="saturation">
298
+ <InputColorTransparencyGrid />
299
+ <InputColorSliderTrack />
300
+ <InputColorSliderHandle />
301
+ </InputColorSlider>
302
+ <InputColorSlider channel="lightness">
303
+ <InputColorTransparencyGrid />
304
+ <InputColorSliderTrack />
305
+ <InputColorSliderHandle />
306
+ </InputColorSlider>
307
+ </template>
308
+ <InputColorSlider channel="alpha">
309
+ <InputColorTransparencyGrid />
310
+ <InputColorSliderTrack />
311
+ <InputColorSliderHandle />
312
+ </InputColorSlider>
313
+ <div class="flex gap-2">
314
+ <InputColorSwatch>
315
+ <InputColorTransparencyGrid />
316
+ <InputColorSwatchBackground />
317
+ </InputColorSwatch>
318
+ <InputColorEyeDropper severity="secondary" variant="outlined">
319
+ <template #icon>
320
+ <EyeDropper />
321
+ </template>
322
+ </InputColorEyeDropper>
323
+ <InputColorInput channel="hex" class="flex-1" />
324
+ </div>
325
+ <InputGroup>
326
+ <FloatLabel variant="in">
327
+ <InputColorInput channel="red" type="text" size="small" />
328
+ <label>Red</label>
329
+ </FloatLabel>
330
+ <FloatLabel variant="in">
331
+ <InputColorInput channel="green" type="text" size="small" />
332
+ <label>Green</label>
333
+ </FloatLabel>
334
+ <FloatLabel variant="in">
335
+ <InputColorInput channel="blue" type="text" size="small" />
336
+ <label>Blue</label>
337
+ </FloatLabel>
338
+ <FloatLabel variant="in">
339
+ <InputColorInput channel="alpha" type="text" size="small" />
340
+ <label>Alpha</label>
341
+ </FloatLabel>
342
+ </InputGroup>
343
+ <InputGroup>
344
+ <FloatLabel variant="in">
345
+ <InputColorInput channel="hue" type="text" size="small" />
346
+ <label>Hue</label>
347
+ </FloatLabel>
348
+ <FloatLabel variant="in">
349
+ <InputColorInput channel="saturation" type="text" size="small" />
350
+ <label>Saturation</label>
351
+ </FloatLabel>
352
+ <FloatLabel variant="in">
353
+ <InputColorInput channel="brightness" type="text" size="small" />
354
+ <label>Brightness</label>
355
+ </FloatLabel>
356
+ <FloatLabel variant="in">
357
+ <InputColorInput channel="alpha" type="text" size="small" />
358
+ <label>Alpha</label>
359
+ </FloatLabel>
360
+ </InputGroup>
361
+ <InputGroup>
362
+ <FloatLabel variant="in">
363
+ <InputColorInput channel="hue" type="text" size="small" />
364
+ <label>Hue</label>
365
+ </FloatLabel>
366
+ <FloatLabel variant="in">
367
+ <InputColorInput channel="saturation" type="text" size="small" />
368
+ <label>Saturation</label>
369
+ </FloatLabel>
370
+ <FloatLabel variant="in">
371
+ <InputColorInput channel="lightness" type="text" size="small" />
372
+ <label>Lightness</label>
373
+ </FloatLabel>
374
+ <FloatLabel variant="in">
375
+ <InputColorInput channel="alpha" type="text" size="small" />
376
+ <label>Alpha</label>
377
+ </FloatLabel>
378
+ </InputGroup>
379
+ <InputGroup>
380
+ <FloatLabel variant="in">
381
+ <InputColorInput channel="L" type="text" size="small" />
382
+ <label>Lightness</label>
383
+ </FloatLabel>
384
+ <FloatLabel variant="in">
385
+ <InputColorInput channel="C" type="text" size="small" />
386
+ <label>Chroma</label>
387
+ </FloatLabel>
388
+ <FloatLabel variant="in">
389
+ <InputColorInput channel="H" type="text" size="small" />
390
+ <label>Hue</label>
391
+ </FloatLabel>
392
+ <FloatLabel variant="in">
393
+ <InputColorInput channel="alpha" type="text" size="small" />
394
+ <label>Alpha</label>
395
+ </FloatLabel>
396
+ </InputGroup>
397
+ <InputGroup>
398
+ <InputGroupAddon>CSS</InputGroupAddon>
399
+ <InputColorInput channel="css" type="text" fluid />
400
+ </InputGroup>
401
+ </InputColor>
402
+ </div>
403
+ </div>
404
+ </template>
405
+
406
+ <script setup>
407
+ import EyeDropper from '@primeicons/vue/eye-dropper';
408
+ import { ref } from 'vue';
409
+
410
+ const value = ref('#ff0000');
411
+ const format = ref('hsla');
412
+ const formatOptions = [
413
+ { label: 'RGBA', value: 'rgba' },
414
+ { label: 'HSBA', value: 'hsba' },
415
+ { label: 'HSLA', value: 'hsla' },
416
+ { label: 'OKLCHA', value: 'oklcha' }
417
+ ];
418
+ <\/script>
419
+ ```
420
+
421
+ ## Forms
422
+
423
+ InputColor integrates seamlessly with the PrimeVue Forms library.
424
+
425
+ ```vue
426
+ <template>
427
+ <div class="flex justify-center">
428
+ <Form v-slot="$form" :resolver="resolver" :initialValues="initialValues" @submit="onFormSubmit" class="flex flex-col gap-4">
429
+ <div class="flex flex-col items-center gap-2">
430
+ <div class="max-w-xs mx-auto space-y-3 w-xs">
431
+ <InputColor name="color" format="hex">
432
+ <InputColorArea>
433
+ <InputColorAreaBackground />
434
+ <InputColorAreaHandle />
435
+ </InputColorArea>
436
+ <div class="flex items-center gap-2">
437
+ <div class="flex-1 space-y-1 mr-1">
438
+ <InputColorSlider>
439
+ <InputColorTransparencyGrid />
440
+ <InputColorSliderTrack />
441
+ <InputColorSliderHandle />
442
+ </InputColorSlider>
443
+ <InputColorSlider channel="alpha">
444
+ <InputColorTransparencyGrid />
445
+ <InputColorSliderTrack />
446
+ <InputColorSliderHandle />
447
+ </InputColorSlider>
448
+ </div>
449
+ <InputColorSwatch>
450
+ <InputColorTransparencyGrid />
451
+ <InputColorSwatchBackground />
452
+ </InputColorSwatch>
453
+ <InputColorEyeDropper severity="secondary" variant="outlined">
454
+ <template #icon>
455
+ <EyeDropper />
456
+ </template>
457
+ </InputColorEyeDropper>
458
+ </div>
459
+ <InputColorInput fluid channel="hex" />
460
+ </InputColor>
461
+ </div>
462
+ <Message v-if="$form.color?.invalid" severity="error" size="small" variant="simple">{{ $form.color.error?.message }}</Message>
463
+ </div>
464
+ <Button type="submit" severity="secondary">Submit</Button>
465
+ </Form>
466
+ </div>
467
+ </template>
468
+
469
+ <script setup>
470
+ import EyeDropper from '@primeicons/vue/eye-dropper';
471
+ import { ref } from 'vue';
472
+ import { zodResolver } from '@primevue/forms/resolvers/zod';
473
+ import { useToast } from "primevue/usetoast";
474
+ import { z } from 'zod';
475
+
476
+ const toast = useToast();
477
+ const initialValues = ref({
478
+ color: null
479
+ });
480
+ const resolver = ref(zodResolver(
481
+ z.object({
482
+ color: z.union([z.string(), z.literal(null)]).refine((value) => value !== null, { message: 'Color is required.' })
483
+ })
484
+ ));
485
+
486
+ const onFormSubmit = ({ valid }) => {
487
+ if (valid) {
488
+ toast.add({ severity: 'success', summary: 'Form is submitted.', life: 3000 });
489
+ }
490
+ };
491
+ <\/script>
492
+ ```
493
+
494
+ ## Color Class
495
+
496
+ The Color class is the base class for all color classes. It provides the basic functionality for all color classes. clone() : Clones the color. toString(format) : Converts the color to a string. toFormat(format) : Converts the color to a specific format. toJSON() : Converts the color to a JSON object. getChannelRange(channel) : Returns the range of the channel. getFormat() : Returns the format of the color. getChannels() : Returns the channels of the color. getChannelValue(channel) : Returns the value of the channel. getSpaceAxes(xyChannels) : Returns the axes of the color. incChannelValue(channel, step) : Increments the value of the channel by the step. decChannelValue(channel, step) : Decrements the value of the channel by the step. setChannelValue(channel, value) : Returns a new color with the value of the channel changed.
497
+
498
+ ## Accessibility
499
+
500
+ InputColorArea Screen Reader The area handle has role="slider" with aria-roledescription="2d slider" . It includes aria-label describing the two axes (e.g., "saturation and brightness"), aria-valuemin , aria-valuemax , aria-valuenow , and aria-valuetext describing the current channel values. Keyboard Support Key Function tab Moves focus to the area handle. right arrow Moves the area handle to the right. left arrow Moves the area handle to the left. up arrow Moves the area handle up. down arrow Moves the area handle down. InputColorSlider Screen Reader The slider handle has role="slider" with aria-label , aria-valuemin , aria-valuemax , aria-valuenow , and aria-valuetext describing the current channel value. Keyboard Support Key Function tab Moves focus to the slider handle. up arrow left arrow Decrements the slider value. down arrow right arrow Increments the slider value.
501
+
502
+ ## Input Color API
503
+
504
+ ### Props
505
+
506
+ | Name |Type |Default |Description |
507
+ | --- | --- | --- | --- |
508
+ | modelValue | Nullable<string> | - | Value of the component, paired with `v-model` . Format follows format . |
509
+ | defaultValue | Nullable<string> | - | The default value for the component. Used in uncontrolled mode and as the initial value when integrated with PrimeVue Forms. |
510
+ | name | string | - | The name attribute for the component, used to identify it within a form. |
511
+ | format | InputColorFormat | 'hsba' | Output format for `update:modelValue` and channel inputs reading the `css` channel. |
512
+ | disabled | boolean | false | When present, disables the component and all child interactions. |
513
+ | invalid | boolean | false | When present, it specifies that the component should have invalid state style. |
514
+ | formControl | Record<string, any> | - | Form control object, typically provided by parent form context. |
515
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
516
+ | pt | PassThrough<InputColorPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
517
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
518
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
519
+
520
+ ### Pass Through Options
521
+
522
+ | Name |Type |Description |
523
+ | --- | --- | --- |
524
+ | root | InputColorPassThroughOptionType | Used to pass attributes to the root's DOM element. |
525
+ | hooks | any | Used to manage all lifecycle hooks. |
526
+
527
+ ### Theming
528
+
529
+ ### CSS Classes
530
+
531
+ | Class |Description |
532
+ | --- | --- |
533
+ | p-inputcolor | Class name of the root element |
534
+
535
+ ### Design Tokens
536
+
537
+ | Token |CSS Variable |Description |
538
+ | --- | --- | --- |
539
+ | inputcolor.border.color | --p-inputcolor-border-color | Shared inset border color (area background, slider track, swatch background) |
540
+ | inputcolor.area.border.radius | --p-inputcolor-area-border-radius | Border radius of area |
541
+ | inputcolor.slider.border.radius | --p-inputcolor-slider-border-radius | Border radius of slider |
542
+ | inputcolor.slider.size | --p-inputcolor-slider-size | Size of slider (horizontal height / vertical width) |
543
+ | inputcolor.handle.size | --p-inputcolor-handle-size | Size of handle (area and slider) |
544
+ | inputcolor.handle.border.color | --p-inputcolor-handle-border-color | Border color of handle |
545
+ | inputcolor.handle.border.width | --p-inputcolor-handle-border-width | Border width of handle |
546
+ | inputcolor.handle.shadow | --p-inputcolor-handle-shadow | Shadow of handle |
547
+ | inputcolor.handle.transition.duration | --p-inputcolor-handle-transition-duration | Transition duration of handle |
548
+ | inputcolor.handle.focus.ring.border.width | --p-inputcolor-handle-focus-ring-border-width | Focus ring border width of handle |
549
+ | inputcolor.handle.focus.ring.border.color | --p-inputcolor-handle-focus-ring-border-color | Focus ring border color of handle |
550
+ | inputcolor.handle.focus.ring.outline.width | --p-inputcolor-handle-focus-ring-outline-width | Focus ring outline width of handle |
551
+ | inputcolor.handle.focus.ring.outline.color | --p-inputcolor-handle-focus-ring-outline-color | Focus ring outline color of handle |
552
+ | inputcolor.handle.focus.ring.outline.offset | --p-inputcolor-handle-focus-ring-outline-offset | Focus ring outline offset of handle |
553
+ | inputcolor.transparency.grid.color | --p-inputcolor-transparency-grid-color | Color of transparency grid (checker pattern) |
554
+ | inputcolor.transparency.grid.background | --p-inputcolor-transparency-grid-background | Background of transparency grid (checker base) |
555
+ | inputcolor.transparency.grid.tile.size | --p-inputcolor-transparency-grid-tile-size | Tile size of transparency grid |
556
+ | inputcolor.swatch.size | --p-inputcolor-swatch-size | Size of swatch |
557
+ | inputcolor.swatch.border.radius | --p-inputcolor-swatch-border-radius | Border radius of swatch |
558
+
559
+ ## Input Color Area API
560
+
561
+ ### Props
562
+
563
+ | Name |Type |Default |Description |
564
+ | --- | --- | --- | --- |
565
+ | as | string \| Component | DIV | Use to change the HTML tag of root element. |
566
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
567
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
568
+ | pt | PassThrough<InputColorAreaPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
569
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
570
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
571
+
572
+ ### Pass Through Options
573
+
574
+ | Name |Type |Description |
575
+ | --- | --- | --- |
576
+ | root | InputColorAreaPassThroughOptionType | Used to pass attributes to the root's DOM element. |
577
+ | hooks | any | Used to manage all lifecycle hooks. |
578
+
579
+ ### Theming
580
+
581
+ ### CSS Classes
582
+
583
+ | Class |Description |
584
+ | --- | --- |
585
+ | p-inputcolor-area | Class name of the root element |
586
+
587
+ ## Input Color Area Background API
588
+
589
+ ### Props
590
+
591
+ | Name |Type |Default |Description |
592
+ | --- | --- | --- | --- |
593
+ | as | string \| Component | DIV | Use to change the HTML tag of root element. |
594
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
595
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
596
+ | pt | PassThrough<InputColorAreaBackgroundPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
597
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
598
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
599
+
600
+ ### Pass Through Options
601
+
602
+ | Name |Type |Description |
603
+ | --- | --- | --- |
604
+ | root | InputColorAreaBackgroundPassThroughOptionType | Used to pass attributes to the root's DOM element. |
605
+ | hooks | any | Used to manage all lifecycle hooks. |
606
+
607
+ ### Theming
608
+
609
+ ### CSS Classes
610
+
611
+ | Class |Description |
612
+ | --- | --- |
613
+ | p-inputcolor-area-background | Class name of the root element |
614
+
615
+ ## Input Color Area Handle API
616
+
617
+ ### Props
618
+
619
+ | Name |Type |Default |Description |
620
+ | --- | --- | --- | --- |
621
+ | as | string \| Component | DIV | Use to change the HTML tag of root element. |
622
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
623
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
624
+ | pt | PassThrough<InputColorAreaHandlePassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
625
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
626
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
627
+
628
+ ### Pass Through Options
629
+
630
+ | Name |Type |Description |
631
+ | --- | --- | --- |
632
+ | root | InputColorAreaHandlePassThroughOptionType | Used to pass attributes to the root's DOM element. |
633
+ | hooks | any | Used to manage all lifecycle hooks. |
634
+
635
+ ### Theming
636
+
637
+ ### CSS Classes
638
+
639
+ | Class |Description |
640
+ | --- | --- |
641
+ | p-inputcolor-area-handle | Class name of the root element |
642
+
643
+ ## Input Color Slider API
644
+
645
+ ### Props
646
+
647
+ | Name |Type |Default |Description |
648
+ | --- | --- | --- | --- |
649
+ | channel | InputColorSliderChannel | 'hue' | Channel this slider drives. |
650
+ | orientation | InputColorSliderOrientation | 'horizontal' | Slider orientation. |
651
+ | disabled | boolean | false | Disable just this slider (in addition to the parent `InputColor.disabled` ). |
652
+ | as | string \| Component | DIV | Use to change the HTML tag of root element. |
653
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
654
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
655
+ | pt | PassThrough<InputColorSliderPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
656
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
657
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
658
+
659
+ ### Pass Through Options
660
+
661
+ | Name |Type |Description |
662
+ | --- | --- | --- |
663
+ | root | InputColorSliderPassThroughOptionType | Used to pass attributes to the root's DOM element. |
664
+ | hooks | any | Used to manage all lifecycle hooks. |
665
+
666
+ ### Theming
667
+
668
+ ### CSS Classes
669
+
670
+ | Class |Description |
671
+ | --- | --- |
672
+ | p-inputcolor-slider | Class name of the root element |
673
+
674
+ ## Input Color Slider Handle API
675
+
676
+ ### Props
677
+
678
+ | Name |Type |Default |Description |
679
+ | --- | --- | --- | --- |
680
+ | as | string \| Component | DIV | Use to change the HTML tag of root element. |
681
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
682
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
683
+ | pt | PassThrough<InputColorSliderHandlePassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
684
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
685
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
686
+
687
+ ### Pass Through Options
688
+
689
+ | Name |Type |Description |
690
+ | --- | --- | --- |
691
+ | root | InputColorSliderHandlePassThroughOptionType | Used to pass attributes to the root's DOM element. |
692
+ | hooks | any | Used to manage all lifecycle hooks. |
693
+
694
+ ### Theming
695
+
696
+ ### CSS Classes
697
+
698
+ | Class |Description |
699
+ | --- | --- |
700
+ | p-inputcolor-slider-handle | Class name of the root element |
701
+
702
+ ## Input Color Slider Track API
703
+
704
+ ### Props
705
+
706
+ | Name |Type |Default |Description |
707
+ | --- | --- | --- | --- |
708
+ | as | string \| Component | DIV | Use to change the HTML tag of root element. |
709
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
710
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
711
+ | pt | PassThrough<InputColorSliderTrackPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
712
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
713
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
714
+
715
+ ### Pass Through Options
716
+
717
+ | Name |Type |Description |
718
+ | --- | --- | --- |
719
+ | root | InputColorSliderTrackPassThroughOptionType | Used to pass attributes to the root's DOM element. |
720
+ | hooks | any | Used to manage all lifecycle hooks. |
721
+
722
+ ### Theming
723
+
724
+ ### CSS Classes
725
+
726
+ | Class |Description |
727
+ | --- | --- |
728
+ | p-inputcolor-slider-track | Class name of the root element |
729
+
730
+ ## Input Color Swatch API
731
+
732
+ ### Props
733
+
734
+ | Name |Type |Default |Description |
735
+ | --- | --- | --- | --- |
736
+ | as | string \| Component | DIV | Use to change the HTML tag of root element. |
737
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
738
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
739
+ | pt | PassThrough<InputColorSwatchPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
740
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
741
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
742
+
743
+ ### Pass Through Options
744
+
745
+ | Name |Type |Description |
746
+ | --- | --- | --- |
747
+ | root | InputColorSwatchPassThroughOptionType | Used to pass attributes to the root's DOM element. |
748
+ | hooks | any | Used to manage all lifecycle hooks. |
749
+
750
+ ### Theming
751
+
752
+ ### CSS Classes
753
+
754
+ | Class |Description |
755
+ | --- | --- |
756
+ | p-inputcolor-swatch | Class name of the root element |
757
+
758
+ ## Input Color Swatch Background API
759
+
760
+ ### Props
761
+
762
+ | Name |Type |Default |Description |
763
+ | --- | --- | --- | --- |
764
+ | as | string \| Component | DIV | Use to change the HTML tag of root element. |
765
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
766
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
767
+ | pt | PassThrough<InputColorSwatchBackgroundPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
768
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
769
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
770
+
771
+ ### Pass Through Options
772
+
773
+ | Name |Type |Description |
774
+ | --- | --- | --- |
775
+ | root | InputColorSwatchBackgroundPassThroughOptionType | Used to pass attributes to the root's DOM element. |
776
+ | hooks | any | Used to manage all lifecycle hooks. |
777
+
778
+ ### Theming
779
+
780
+ ### CSS Classes
781
+
782
+ | Class |Description |
783
+ | --- | --- |
784
+ | p-inputcolor-swatch-background | Class name of the root element |
785
+
786
+ ## Input Color Eye Dropper API
787
+
788
+ ### Props
789
+
790
+ | Name |Type |Default |Description |
791
+ | --- | --- | --- | --- |
792
+ | as | string \| Component | Button | Use to change the HTML tag of root element. |
793
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
794
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
795
+ | pt | PassThrough<InputColorEyeDropperPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
796
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
797
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
798
+
799
+ ### Pass Through Options
800
+
801
+ | Name |Type |Description |
802
+ | --- | --- | --- |
803
+ | root | InputColorEyeDropperPassThroughOptionType | Used to pass attributes to the root's DOM element. |
804
+ | hooks | any | Used to manage all lifecycle hooks. |
805
+
806
+ ### Theming
807
+
808
+ ### CSS Classes
809
+
810
+ | Class |Description |
811
+ | --- | --- |
812
+ | p-inputcolor-eye-dropper | Class name of the root element |
813
+
814
+ ## Input Color Input API
815
+
816
+ ### Props
817
+
818
+ | Name |Type |Default |Description |
819
+ | --- | --- | --- | --- |
820
+ | as | string \| Component | InputText | Component or HTML tag to render as. Defaults to PrimeVue's `InputText` . |
821
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
822
+ | channel | InputColorInputChannel | 'hex' | Channel this input drives. |
823
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
824
+ | pt | PassThrough<InputColorInputPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
825
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
826
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
827
+
828
+ ### Pass Through Options
829
+
830
+ | Name |Type |Description |
831
+ | --- | --- | --- |
832
+ | root | InputColorInputPassThroughOptionType | Used to pass attributes to the root's DOM element. |
833
+ | hooks | any | Used to manage all lifecycle hooks. |
834
+
835
+ ### Theming
836
+
837
+ ### CSS Classes
838
+
839
+ | Class |Description |
840
+ | --- | --- |
841
+ | p-inputcolor-input | Class name of the root element |
842
+
843
+ ## Input Color Transparency Grid API
844
+
845
+ ### Props
846
+
847
+ | Name |Type |Default |Description |
848
+ | --- | --- | --- | --- |
849
+ | as | string \| Component | DIV | Use to change the HTML tag of root element. |
850
+ | asChild | boolean | false | When enabled, it changes the default rendered element for the one passed as a child element. |
851
+ | dt | any | - | It generates scoped CSS variables using design tokens for the component. |
852
+ | pt | PassThrough<InputColorTransparencyGridPassThroughOptions> | - | Used to pass attributes to DOM elements inside the component. |
853
+ | ptOptions | any | - | Used to configure passthrough(pt) options of the component. |
854
+ | unstyled | boolean | false | When enabled, it removes component related styles in the core. |
855
+
856
+ ### Pass Through Options
857
+
858
+ | Name |Type |Description |
859
+ | --- | --- | --- |
860
+ | root | InputColorTransparencyGridPassThroughOptionType | Used to pass attributes to the root's DOM element. |
861
+ | hooks | any | Used to manage all lifecycle hooks. |
862
+
863
+ ### Theming
864
+
865
+ ### CSS Classes
866
+
867
+ | Class |Description |
868
+ | --- | --- |
869
+ | p-inputcolor-transparency-grid | Class name of the root element |