@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.
- package/LICENSE.md +45 -21
- package/README.md +48 -250
- package/data/components.json +47269 -0
- package/data/llms/components/accordion.md +629 -0
- package/data/llms/components/animateonscroll.md +165 -0
- package/data/llms/components/autocomplete.md +995 -0
- package/data/llms/components/avatar.md +264 -0
- package/data/llms/components/badge.md +200 -0
- package/data/llms/components/blockui.md +99 -0
- package/data/llms/components/breadcrumb.md +269 -0
- package/data/llms/components/button.md +902 -0
- package/data/llms/components/card.md +209 -0
- package/data/llms/components/carousel.md +506 -0
- package/data/llms/components/cascadeselect.md +1207 -0
- package/data/llms/components/chart.md +1022 -0
- package/data/llms/components/checkbox.md +401 -0
- package/data/llms/components/chip.md +206 -0
- package/data/llms/components/colorpicker.md +213 -0
- package/data/llms/components/commandmenu.md +660 -0
- package/data/llms/components/compare.md +407 -0
- package/data/llms/components/confirmdialog.md +343 -0
- package/data/llms/components/confirmpopup.md +252 -0
- package/data/llms/components/contextmenu.md +522 -0
- package/data/llms/components/datatable.md +5266 -0
- package/data/llms/components/dataview.md +569 -0
- package/data/llms/components/datepicker.md +964 -0
- package/data/llms/components/deferredcontent.md +96 -0
- package/data/llms/components/dialog.md +702 -0
- package/data/llms/components/divider.md +152 -0
- package/data/llms/components/dock.md +488 -0
- package/data/llms/components/drawer.md +469 -0
- package/data/llms/components/dynamicdialog.md +214 -0
- package/data/llms/components/editor.md +205 -0
- package/data/llms/components/fieldset.md +253 -0
- package/data/llms/components/fileupload.md +459 -0
- package/data/llms/components/floatlabel.md +144 -0
- package/data/llms/components/fluid.md +104 -0
- package/data/llms/components/focustrap.md +59 -0
- package/data/llms/components/forms.md +344 -0
- package/data/llms/components/galleria.md +1119 -0
- package/data/llms/components/gallery.md +1003 -0
- package/data/llms/components/iconfield.md +283 -0
- package/data/llms/components/iftalabel.md +96 -0
- package/data/llms/components/image.md +179 -0
- package/data/llms/components/imagecompare.md +108 -0
- package/data/llms/components/inplace.md +183 -0
- package/data/llms/components/inputcolor.md +869 -0
- package/data/llms/components/inputgroup.md +419 -0
- package/data/llms/components/inputmask.md +345 -0
- package/data/llms/components/inputnumber.md +551 -0
- package/data/llms/components/inputotp.md +345 -0
- package/data/llms/components/inputpassword.md +738 -0
- package/data/llms/components/inputtags.md +432 -0
- package/data/llms/components/inputtext.md +569 -0
- package/data/llms/components/installation.md +1 -0
- package/data/llms/components/keyfilter.md +116 -0
- package/data/llms/components/knob.md +318 -0
- package/data/llms/components/label.md +151 -0
- package/data/llms/components/laravel.md +53 -0
- package/data/llms/components/listbox.md +636 -0
- package/data/llms/components/mask.md +203 -0
- package/data/llms/components/mcp.md +39 -0
- package/data/llms/components/megamenu.md +563 -0
- package/data/llms/components/menu.md +651 -0
- package/data/llms/components/menubar.md +446 -0
- package/data/llms/components/message.md +497 -0
- package/data/llms/components/metergroup.md +281 -0
- package/data/llms/components/multiselect.md +752 -0
- package/data/llms/components/orderlist.md +224 -0
- package/data/llms/components/organizationchart.md +418 -0
- package/data/llms/components/paginator.md +221 -0
- package/data/llms/components/panel.md +321 -0
- package/data/llms/components/panelmenu.md +703 -0
- package/data/llms/components/password.md +657 -0
- package/data/llms/components/picklist.md +286 -0
- package/data/llms/components/popover.md +145 -0
- package/data/llms/components/progressbar.md +242 -0
- package/data/llms/components/progressspinner.md +104 -0
- package/data/llms/components/radiobutton.md +427 -0
- package/data/llms/components/rating.md +312 -0
- package/data/llms/components/ripple.md +91 -0
- package/data/llms/components/scrollarea.md +700 -0
- package/data/llms/components/scrollpanel.md +131 -0
- package/data/llms/components/scrolltop.md +87 -0
- package/data/llms/components/select.md +1251 -0
- package/data/llms/components/selectbutton.md +268 -0
- package/data/llms/components/sidebar.md +2232 -0
- package/data/llms/components/skeleton.md +302 -0
- package/data/llms/components/slider.md +416 -0
- package/data/llms/components/speeddial.md +402 -0
- package/data/llms/components/splitbutton.md +840 -0
- package/data/llms/components/splitter.md +447 -0
- package/data/llms/components/stepper.md +551 -0
- package/data/llms/components/styleclass.md +226 -0
- package/data/llms/components/tabs.md +609 -0
- package/data/llms/components/tag.md +178 -0
- package/data/llms/components/terminal.md +123 -0
- package/data/llms/components/textarea.md +519 -0
- package/data/llms/components/tieredmenu.md +578 -0
- package/data/llms/components/timeline.md +494 -0
- package/data/llms/components/toast.md +472 -0
- package/data/llms/components/togglebutton.md +276 -0
- package/data/llms/components/toggleswitch.md +271 -0
- package/data/llms/components/toolbar.md +140 -0
- package/data/llms/components/tooltip.md +160 -0
- package/data/llms/components/tree.md +1076 -0
- package/data/llms/components/treeselect.md +660 -0
- package/data/llms/components/treetable.md +2493 -0
- package/data/llms/components/virtualscroller.md +265 -0
- package/data/llms/guides/autoimport.md +28 -0
- package/data/llms/guides/cdn.md +72 -0
- package/data/llms/guides/configuration.md +158 -0
- package/data/llms/guides/customicons.md +67 -0
- package/data/llms/guides/guides/accessibility.md +27 -0
- package/data/llms/guides/guides/animations.md +119 -0
- package/data/llms/guides/guides/rtl.md +7 -0
- package/data/llms/guides/icons.md +136 -0
- package/data/llms/guides/installation.md +3 -0
- package/data/llms/guides/laravel.md +66 -0
- package/data/llms/guides/llms.md +15 -0
- package/data/llms/guides/mcp.md +104 -0
- package/data/llms/guides/migration/v4.md +15 -0
- package/data/llms/guides/migration/v5.md +15 -0
- package/data/llms/guides/nuxt.md +141 -0
- package/data/llms/guides/passthrough.md +137 -0
- package/data/llms/guides/primeclt.md +43 -0
- package/data/llms/guides/tailwind.md +151 -0
- package/data/llms/guides/theming/styled.md +497 -0
- package/data/llms/guides/theming/unstyled.md +57 -0
- package/data/llms/guides/uikit.md +3 -0
- package/data/llms/guides/vite.md +90 -0
- package/data/llms/llms-full.txt +54465 -0
- package/data/llms/llms.txt +132 -0
- package/data/llms/pages/accessibility.md +27 -0
- package/data/llms/pages/animations.md +119 -0
- package/data/llms/pages/autoimport.md +28 -0
- package/data/llms/pages/cdn.md +72 -0
- package/data/llms/pages/configuration.md +158 -0
- package/data/llms/pages/contribution.md +31 -0
- package/data/llms/pages/customicons.md +67 -0
- package/data/llms/pages/designer.md +79 -0
- package/data/llms/pages/dynamicimports.md +7 -0
- package/data/llms/pages/forms.md +63 -0
- package/data/llms/pages/guides/accessibility.md +27 -0
- package/data/llms/pages/guides/animations.md +119 -0
- package/data/llms/pages/guides/rtl.md +7 -0
- package/data/llms/pages/icons.md +136 -0
- package/data/llms/pages/installation.md +3 -0
- package/data/llms/pages/introduction.md +23 -0
- package/data/llms/pages/laravel.md +66 -0
- package/data/llms/pages/llms.md +15 -0
- package/data/llms/pages/mcp.md +104 -0
- package/data/llms/pages/migration/v4.md +15 -0
- package/data/llms/pages/migration/v5.md +15 -0
- package/data/llms/pages/nuxt.md +141 -0
- package/data/llms/pages/passthrough.md +137 -0
- package/data/llms/pages/primeclt.md +43 -0
- package/data/llms/pages/rtl.md +7 -0
- package/data/llms/pages/setup.md +3 -0
- package/data/llms/pages/styled.md +497 -0
- package/data/llms/pages/tailwind.md +151 -0
- package/data/llms/pages/theming/styled.md +497 -0
- package/data/llms/pages/theming/unstyled.md +57 -0
- package/data/llms/pages/uikit.md +3 -0
- package/data/llms/pages/unstyled.md +57 -0
- package/data/llms/pages/v4.md +15 -0
- package/data/llms/pages/v5.md +15 -0
- package/data/llms/pages/vite.md +90 -0
- package/data/manifest.json +11117 -0
- package/data/mcp-data.json +55940 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +66066 -72541
- package/package.json +10 -12
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
# Styled Mode
|
|
2
|
+
|
|
3
|
+
Choose from a variety of pre-styled themes or develop your own.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
PrimeVue is a design agnostic library so unlike some other UI libraries it does not enforce a certain styling such as material design. Styling is decoupled from the components using the themes instead. A theme consists of two parts; base and preset . The base is the style rules with CSS variables as placeholders whereas the preset is a set of design tokens to feed a base by mapping the tokens to CSS variables. A base may be configured with different presets, currently Aura, Material, Lara and Nora are the available built-in options. The core of the styled mode architecture is based on a concept named design token , a preset defines the token configuration in 3 tiers; primitive , semantic and component . Learn more about design tokens at the Design Tokens Format Module specification. Primitive Tokens Primitive tokens have no context, a color palette is a good example for a primitive token such as blue-50 to blue-900 . A token named blue-500 may be used as the primary color, the background of a message however on its own, the name of the token does not indicate context. Usually they are utilized by the semantic tokens. Semantic Tokens Semantic tokens define content and their names indicate where they are utilized, a well known example of a semantic token is the primary.color . Semantic tokens map to primitive tokens or other semantic tokens. The colorScheme token group is a special variable to define tokens based on the color scheme active in the application, this allows defining different tokens based on the color scheme like dark mode. Component Tokens Component tokens are isolated tokens per component such as inputtext.background or button.color that map to the semantic tokens. As an example, button.background component token maps to the primary.color semantic token which maps to the green.500 primitive token. Best Practices Use primitive tokens when defining the core color palette and semantic tokens to specify the common design elements such as focus ring, primary colors and surfaces. Components tokens should only be used when customizing a specific component. By defining your own design tokens as a custom preset, you'll be able to define your own style without touching CSS. Overriding the PrimeVue components using style classes is not a best practice and should be the last resort, design tokens are the suggested approach.
|
|
8
|
+
|
|
9
|
+
## Theme
|
|
10
|
+
|
|
11
|
+
The theme property is used to customize the initial theme.
|
|
12
|
+
|
|
13
|
+
```vue
|
|
14
|
+
import PrimeVue from 'primevue/config';
|
|
15
|
+
import Aura from '@primeuix/themes/aura';
|
|
16
|
+
|
|
17
|
+
const app = createApp(App);
|
|
18
|
+
|
|
19
|
+
app.use(PrimeVue, {
|
|
20
|
+
|
|
21
|
+
theme: {
|
|
22
|
+
preset: Aura,
|
|
23
|
+
// Default options
|
|
24
|
+
options: {
|
|
25
|
+
prefix: 'p',
|
|
26
|
+
darkModeSelector: 'system',
|
|
27
|
+
cssLayer: false,
|
|
28
|
+
cssVariables: true
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Options
|
|
35
|
+
|
|
36
|
+
The options property defines the how the CSS would be generated from the design tokens of the preset. prefix The prefix of the CSS variables, defaults to p . For instance, the primary.color design token would be var(--p-primary-color) . darkModeSelector The CSS rule to encapsulate the CSS variables of the dark mode, the default is the system to generate @media (prefers-color-scheme: dark) . If you need to make the dark mode toggleable based on the user selection define a class selector such as .app-dark and toggle this class at the document root. See the dark mode toggle section for an example. cssLayer Defines whether the styles should be defined inside a CSS layer by default or not. A CSS layer would be handy to declare a custom cascade layer for easier customization if necessary. The default is false . cssVariables Controls whether component design tokens are generated as CSS variables or inlined as static values. Primitive and semantic tokens are always generated as CSS variables.
|
|
37
|
+
|
|
38
|
+
## Presets
|
|
39
|
+
|
|
40
|
+
Aura, Material, Lara and Nora are the available built-in options, created to demonstrate the power of the design-agnostic theming. Aura is PrimeTek's own vision, Material follows Google Material Design v2, Lara is based on Bootstrap and Nora is inspired by enterprise applications. Visit the source code to learn more about the structure of presets. You may use them out of the box with modifications or utilize them as reference in case you need to build your own presets from scratch.
|
|
41
|
+
|
|
42
|
+
## Base Font Size
|
|
43
|
+
|
|
44
|
+
PrimeVue sizes its components in rem units relative to the document root font size, which it assumes to be 16px , the browser default. Earlier versions assumed 14px for historical reasons, so to avoid disrupting existing layouts every preset also ships a compat variant calibrated for a 14px root. The compat variants are maintained until June 2027 . When migrating an existing application that uses 14px base font to PrimeVue v5 or newer, the recommended path is to switch to the compat preset first to preserve the current appearance, then set the document root size to 16px and move to the standard (non-compat) preset once the rest of the application has been migrated to the 16px baseline. If your application already uses a 16px document root, no change is required and you can use the standard presets directly. Preset 16px 14px (Legacy) Aura @primeuix/themes/aura @primeuix/themes/aura-compat Lara @primeuix/themes/lara @primeuix/themes/lara-compat Material @primeuix/themes/material @primeuix/themes/material-compat Nora @primeuix/themes/nora @primeuix/themes/nora-compat
|
|
45
|
+
|
|
46
|
+
## Reserved Keys
|
|
47
|
+
|
|
48
|
+
Following keys are reserved in the preset scheme and cannot be used as a token name; primitive , semantic , components , directives , colorscheme , light , dark , common , root , states , and extend .
|
|
49
|
+
|
|
50
|
+
## Colors
|
|
51
|
+
|
|
52
|
+
Color palette of a preset is defined by the primitive design token group. You can access colors using CSS variables or the $dt utility.
|
|
53
|
+
|
|
54
|
+
## Dark Mode
|
|
55
|
+
|
|
56
|
+
PrimeVue uses the system as the default darkModeSelector in theme configuration. If you have a dark mode switch in your application, set the darkModeSelector to the selector you utilize such as .my-app-dark so that PrimeVue can fit in seamlessly with your color scheme. Following is a very basic example implementation of a dark mode switch, you may extend it further by involving prefers-color-scheme to retrieve it from the system initially and use localStorage to make it stateful. See this article for more information. In case you prefer to use dark mode all the time, apply the darkModeSelector initially and never change it. It is also possible to disable dark mode completely using false or none as the value of the selector.
|
|
57
|
+
|
|
58
|
+
## definePreset
|
|
59
|
+
|
|
60
|
+
The definePreset utility is used to customize an existing preset during the PrimeVue setup. The first parameter is the preset to customize and the second is the design tokens to override.
|
|
61
|
+
|
|
62
|
+
```vue
|
|
63
|
+
import PrimeVue from 'primevue/config';
|
|
64
|
+
import { definePreset } from '@primeuix/themes';
|
|
65
|
+
import Aura from '@primeuix/themes/aura';
|
|
66
|
+
|
|
67
|
+
const MyPreset = definePreset(Aura, {
|
|
68
|
+
//Your customizations, see the following sections for examples
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
app.use(PrimeVue, {
|
|
72
|
+
theme: {
|
|
73
|
+
preset: MyPreset
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Color Scheme
|
|
79
|
+
|
|
80
|
+
Tokens can be defined per color scheme using the light-dark keyword, allowing each token to hold scheme-specific values.
|
|
81
|
+
|
|
82
|
+
```vue
|
|
83
|
+
import PrimeVue from 'primevue/config';
|
|
84
|
+
import { definePreset } from '@primeuix/themes';
|
|
85
|
+
import Aura from '@primeuix/themes/aura';
|
|
86
|
+
|
|
87
|
+
const MyPreset = definePreset(Aura, {
|
|
88
|
+
semantic: {
|
|
89
|
+
primary: {
|
|
90
|
+
color: 'light-dark({primary.500}, {primary.400})',
|
|
91
|
+
contrastColor: 'light-dark(#ffffff, {surface.900})'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
app.use(PrimeVue, {
|
|
97
|
+
theme: {
|
|
98
|
+
preset: MyPreset
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Primary
|
|
104
|
+
|
|
105
|
+
The primary defines the main color palette, default value maps to the emerald primitive token. Let's setup to use indigo instead.
|
|
106
|
+
|
|
107
|
+
```vue
|
|
108
|
+
const MyPreset = definePreset(Aura, {
|
|
109
|
+
semantic: {
|
|
110
|
+
primary: {
|
|
111
|
+
50: '{indigo.50}',
|
|
112
|
+
100: '{indigo.100}',
|
|
113
|
+
200: '{indigo.200}',
|
|
114
|
+
300: '{indigo.300}',
|
|
115
|
+
400: '{indigo.400}',
|
|
116
|
+
500: '{indigo.500}',
|
|
117
|
+
600: '{indigo.600}',
|
|
118
|
+
700: '{indigo.700}',
|
|
119
|
+
800: '{indigo.800}',
|
|
120
|
+
900: '{indigo.900}',
|
|
121
|
+
950: '{indigo.950}'
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Surface
|
|
128
|
+
|
|
129
|
+
The color scheme palette that varies between light and dark modes is specified with the surface tokens. Example below uses stone for light mode and zinc for dark mode. With this setting, light mode, would have a grayscale tone and dark mode would include bluish tone.
|
|
130
|
+
|
|
131
|
+
```vue
|
|
132
|
+
const MyPreset = definePreset(Aura, {
|
|
133
|
+
semantic: {
|
|
134
|
+
surface: {
|
|
135
|
+
0: '#ffffff',
|
|
136
|
+
50: 'light-dark({stone.50}, {zinc.50})',
|
|
137
|
+
100: 'light-dark({stone.100}, {zinc.100})',
|
|
138
|
+
200: 'light-dark({stone.200}, {zinc.200})',
|
|
139
|
+
300: 'light-dark({stone.300}, {zinc.300})',
|
|
140
|
+
400: 'light-dark({stone.400}, {zinc.400})',
|
|
141
|
+
500: 'light-dark({stone.500}, {zinc.500})',
|
|
142
|
+
600: 'light-dark({stone.600}, {zinc.600})',
|
|
143
|
+
700: 'light-dark({stone.700}, {zinc.700})',
|
|
144
|
+
800: 'light-dark({stone.800}, {zinc.800})',
|
|
145
|
+
900: 'light-dark({stone.900}, {zinc.900})',
|
|
146
|
+
950: 'light-dark({stone.950}, {zinc.950})'
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Noir
|
|
153
|
+
|
|
154
|
+
The noir mode is a sleek, monochrome variant where the primary color is derived from the neutral surface palette instead of a distinct accent color. The example below maps the primary palette to surface tones and uses the light-dark function to define the light and dark values of the primary and highlight tokens in a single place;
|
|
155
|
+
|
|
156
|
+
```vue
|
|
157
|
+
const Noir = definePreset(Aura, {
|
|
158
|
+
semantic: {
|
|
159
|
+
primary: {
|
|
160
|
+
50: '{surface.50}',
|
|
161
|
+
100: '{surface.100}',
|
|
162
|
+
200: '{surface.200}',
|
|
163
|
+
300: '{surface.300}',
|
|
164
|
+
400: '{surface.400}',
|
|
165
|
+
500: '{surface.500}',
|
|
166
|
+
600: '{surface.600}',
|
|
167
|
+
700: '{surface.700}',
|
|
168
|
+
800: '{surface.800}',
|
|
169
|
+
900: '{surface.900}',
|
|
170
|
+
950: '{surface.950}',
|
|
171
|
+
color: 'light-dark({primary.950}, {primary.50})',
|
|
172
|
+
contrastColor: 'light-dark(#ffffff, {primary.950})',
|
|
173
|
+
hoverColor: 'light-dark({primary.800}, {primary.200})',
|
|
174
|
+
activeColor: 'light-dark({primary.700}, {primary.300})'
|
|
175
|
+
},
|
|
176
|
+
highlight: {
|
|
177
|
+
background: 'light-dark({primary.950}, {primary.50})',
|
|
178
|
+
focusBackground: 'light-dark({primary.700}, {primary.300})',
|
|
179
|
+
color: 'light-dark(#ffffff, {primary.950})',
|
|
180
|
+
focusColor: 'light-dark(#ffffff, {primary.950})'
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Forms
|
|
187
|
+
|
|
188
|
+
The design tokens of the form input components are derived from the form.field token group. This customization example changes border color to primary on hover. Any component that depends on this semantic token such as dropdown.hover.border.color and textarea.hover.border.color would receive the change.
|
|
189
|
+
|
|
190
|
+
```vue
|
|
191
|
+
const MyPreset = definePreset(Aura, {
|
|
192
|
+
semantic: {
|
|
193
|
+
formField: {
|
|
194
|
+
hoverBorderColor: '{primary.color}'
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Focus Ring
|
|
201
|
+
|
|
202
|
+
Focus ring defines the outline width, style, color and offset. Let's use a thicker ring with the primary color for the outline.
|
|
203
|
+
|
|
204
|
+
```vue
|
|
205
|
+
const MyPreset = definePreset(Aura, {
|
|
206
|
+
semantic: {
|
|
207
|
+
focusRing: {
|
|
208
|
+
width: '2px',
|
|
209
|
+
style: 'dashed',
|
|
210
|
+
color: '{primary.color}',
|
|
211
|
+
offset: '1px'
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Component
|
|
218
|
+
|
|
219
|
+
The design tokens of a specific component is defined at components layer. This configuration is global and applies to all card components, in case you need to customize a particular component on a page locally, view the Scoped CSS section for an example. Tip : Overriding component tokens is best suited for small adjustments. For heavy customization, building your own preset is the recommended approach.
|
|
220
|
+
|
|
221
|
+
```vue
|
|
222
|
+
const MyPreset = definePreset(Aura, {
|
|
223
|
+
components: {
|
|
224
|
+
card: {
|
|
225
|
+
root: {
|
|
226
|
+
background: 'light-dark({surface.0}, {surface.900})',
|
|
227
|
+
color: 'light-dark({surface.700}, {surface.0})'
|
|
228
|
+
},
|
|
229
|
+
subtitle: {
|
|
230
|
+
color: 'light-dark({surface.500}, {surface.400})'
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## Typography
|
|
238
|
+
|
|
239
|
+
Typography tokens are defined at the semantic level for consistency and at the component level for specialization.
|
|
240
|
+
|
|
241
|
+
```vue
|
|
242
|
+
const MyPreset = definePreset(Aura, {
|
|
243
|
+
semantic: {
|
|
244
|
+
typography: {
|
|
245
|
+
lineHeight: '1.5',
|
|
246
|
+
fontFamily: 'inherit',
|
|
247
|
+
fontWeight: 'normal',
|
|
248
|
+
fontSize: '0.875rem'
|
|
249
|
+
},
|
|
250
|
+
formField: {
|
|
251
|
+
fontWeight: '{typography.font.weight}',
|
|
252
|
+
fontSize: '{typography.font.size}'
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
components: {
|
|
256
|
+
select: {
|
|
257
|
+
fontSize: '{form.field.font.size}',
|
|
258
|
+
fontWeight: '{form.field.font.weight}'
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Extend
|
|
265
|
+
|
|
266
|
+
The theming system can be extended by adding custom design tokens and additional styles. This feature provides a high degree of customization, allowing you to adjust styles according to your needs, as you are not limited to the default tokens. The example preset configuration adds a new accent button with custom button.accent.color and button.accent.inverse.color tokens. It is also possible to add tokens globally to share them within the components.
|
|
267
|
+
|
|
268
|
+
```vue
|
|
269
|
+
const MyPreset = definePreset(Aura, {
|
|
270
|
+
components: {
|
|
271
|
+
// custom button tokens and additional style
|
|
272
|
+
button: {
|
|
273
|
+
extend: {
|
|
274
|
+
accent: {
|
|
275
|
+
color: '#f59e0b',
|
|
276
|
+
inverseColor: '#ffffff'
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
css: ({ dt }) => \`
|
|
280
|
+
.p-button-accent {
|
|
281
|
+
background: \${dt('button.accent.color')};
|
|
282
|
+
color: \${dt('button.accent.inverse.color')};
|
|
283
|
+
transition-duration: \${dt('my.transition.fast')};
|
|
284
|
+
}
|
|
285
|
+
\`
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
// common tokens and styles
|
|
289
|
+
extend: {
|
|
290
|
+
my: {
|
|
291
|
+
transition: {
|
|
292
|
+
slow: '0.75s'
|
|
293
|
+
normal: '0.5s'
|
|
294
|
+
fast: '0.25s'
|
|
295
|
+
},
|
|
296
|
+
imageDisplay: 'block'
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
css: ({ dt }) => \`
|
|
300
|
+
/* Global CSS */
|
|
301
|
+
img {
|
|
302
|
+
display: \${dt('my.image.display')};
|
|
303
|
+
}
|
|
304
|
+
\`
|
|
305
|
+
});
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
## Scoped Tokens
|
|
309
|
+
|
|
310
|
+
Design tokens can be scoped to a certain component using the dt property. In this example, first switch uses the global tokens whereas second one overrides the global with its own tokens. This approach is recommended over the :deep() as it offers a cleaner API while avoiding the hassle of CSS rule overrides.
|
|
311
|
+
|
|
312
|
+
## usePreset
|
|
313
|
+
|
|
314
|
+
Replaces the current presets entirely, common use case is changing the preset dynamically at runtime.
|
|
315
|
+
|
|
316
|
+
```vue
|
|
317
|
+
import { usePreset } from '@primeuix/themes';
|
|
318
|
+
|
|
319
|
+
const onButtonClick() {
|
|
320
|
+
usePreset(MyPreset);
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## updatePreset
|
|
325
|
+
|
|
326
|
+
Merges the provided tokens to the current preset, an example would be changing the primary color palette dynamically.
|
|
327
|
+
|
|
328
|
+
```vue
|
|
329
|
+
import { updatePreset } from '@primeuix/themes';
|
|
330
|
+
|
|
331
|
+
const changePrimaryColor() {
|
|
332
|
+
updatePreset({
|
|
333
|
+
semantic: {
|
|
334
|
+
primary: {
|
|
335
|
+
50: '{indigo.50}',
|
|
336
|
+
100: '{indigo.100}',
|
|
337
|
+
200: '{indigo.200}',
|
|
338
|
+
300: '{indigo.300}',
|
|
339
|
+
400: '{indigo.400}',
|
|
340
|
+
500: '{indigo.500}',
|
|
341
|
+
600: '{indigo.600}',
|
|
342
|
+
700: '{indigo.700}',
|
|
343
|
+
800: '{indigo.800}',
|
|
344
|
+
900: '{indigo.900}',
|
|
345
|
+
950: '{indigo.950}'
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
})
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
## updatePrimaryPalette
|
|
353
|
+
|
|
354
|
+
Updates the primary colors, this is a shorthand to do the same update using updatePreset .
|
|
355
|
+
|
|
356
|
+
```vue
|
|
357
|
+
import { updatePrimaryPalette } from '@primeuix/themes';
|
|
358
|
+
|
|
359
|
+
const changePrimaryColor() {
|
|
360
|
+
updatePrimaryPalette({
|
|
361
|
+
50: '{indigo.50}',
|
|
362
|
+
100: '{indigo.100}',
|
|
363
|
+
200: '{indigo.200}',
|
|
364
|
+
300: '{indigo.300}',
|
|
365
|
+
400: '{indigo.400}',
|
|
366
|
+
500: '{indigo.500}',
|
|
367
|
+
600: '{indigo.600}',
|
|
368
|
+
700: '{indigo.700}',
|
|
369
|
+
800: '{indigo.800}',
|
|
370
|
+
900: '{indigo.900}',
|
|
371
|
+
950: '{indigo.950}'
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## updateSurfacePalette
|
|
377
|
+
|
|
378
|
+
Updates the surface colors, this is a shorthand to do the same update using updatePreset .
|
|
379
|
+
|
|
380
|
+
```vue
|
|
381
|
+
import { updateSurfacePalette } from '@primeuix/themes';
|
|
382
|
+
|
|
383
|
+
const changeSurfaces() {
|
|
384
|
+
//changes surfaces both in light and dark mode
|
|
385
|
+
updateSurfacePalette({
|
|
386
|
+
50: '{zinc.50}',
|
|
387
|
+
// ...
|
|
388
|
+
950: '{zinc.950}'
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
const changeLightSurfaces() {
|
|
393
|
+
//changes surfaces only in light
|
|
394
|
+
updateSurfacePalette({
|
|
395
|
+
light: {
|
|
396
|
+
50: '{zinc.50}',
|
|
397
|
+
// ...
|
|
398
|
+
950: '{zinc.950}'
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
const changeDarkSurfaces() {
|
|
404
|
+
//changes surfaces only in dark mode
|
|
405
|
+
updateSurfacePalette({
|
|
406
|
+
dark: {
|
|
407
|
+
50: '{zinc.50}',
|
|
408
|
+
// ...
|
|
409
|
+
950: '{zinc.950}'
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
## $dt
|
|
416
|
+
|
|
417
|
+
The $dt function returns the information about a token like the full path and value. This would be useful if you need to access tokens programmatically.
|
|
418
|
+
|
|
419
|
+
```vue
|
|
420
|
+
import { $dt } from '@primeuix/themes';
|
|
421
|
+
|
|
422
|
+
const duration = $dt('transition.duration');
|
|
423
|
+
/*
|
|
424
|
+
duration: {
|
|
425
|
+
name: '--transition-duration',
|
|
426
|
+
variable: 'var(--p-transition-duration)',
|
|
427
|
+
value: '0.2s'
|
|
428
|
+
}
|
|
429
|
+
*/
|
|
430
|
+
|
|
431
|
+
const primaryColor = $dt('primary.color');
|
|
432
|
+
/*
|
|
433
|
+
primaryColor: {
|
|
434
|
+
name: '--primary-color',
|
|
435
|
+
variable: 'var(--p-primary-color)',
|
|
436
|
+
value: {
|
|
437
|
+
light: {
|
|
438
|
+
value: '#10b981',
|
|
439
|
+
paths: {
|
|
440
|
+
name: 'semantic.primary.color',
|
|
441
|
+
binding: {
|
|
442
|
+
name: 'primitive.emerald.500'
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
dark: {
|
|
447
|
+
value: '#34d399',
|
|
448
|
+
paths: {
|
|
449
|
+
name: 'semantic.primary.color',
|
|
450
|
+
binding: {
|
|
451
|
+
name: 'primitive.emerald.400'
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
*/
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
## palette
|
|
461
|
+
|
|
462
|
+
Returns shades and tints of a given color from 50 to 950 as an object.
|
|
463
|
+
|
|
464
|
+
```vue
|
|
465
|
+
import { palette } from '@primeuix/themes';
|
|
466
|
+
|
|
467
|
+
// custom color
|
|
468
|
+
const values1 = palette('#10b981');
|
|
469
|
+
|
|
470
|
+
// copy an existing token set
|
|
471
|
+
const primaryColor = palette('{blue}');
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
## Specificity
|
|
475
|
+
|
|
476
|
+
The @layer is a standard CSS feature to define cascade layers for a customizable order of precedence. If you need to become more familiar with layers, visit the documentation at MDN to begin with. The cssLayer is disabled by default, when it is enabled at theme configuration, PrimeVue wraps the built-in style classes under the primevue cascade layer to make the library styles easy to override. CSS in your app without a layer has the highest CSS specificity, so you'll be able to override styles regardless of the location or how strong a class is written. Layers also make it easier to use CSS Modules, view the CSS Modules guide for examples.
|
|
477
|
+
|
|
478
|
+
## Reset
|
|
479
|
+
|
|
480
|
+
In case PrimeVue components have visual issues in your application, a Reset CSS may be the culprit. CSS layers would be an efficient solution that involves enabling the PrimeVue layer, wrapping the Reset CSS in another layer and defining the layer order. This way, your Reset CSS does not get in the way of PrimeVue components.
|
|
481
|
+
|
|
482
|
+
```vue
|
|
483
|
+
/* Order */
|
|
484
|
+
@layer reset, primevue;
|
|
485
|
+
|
|
486
|
+
/* Reset CSS */
|
|
487
|
+
@layer reset {
|
|
488
|
+
button,
|
|
489
|
+
input {
|
|
490
|
+
/* CSS to Reset */
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
## CSS Modules
|
|
496
|
+
|
|
497
|
+
CSS modules are supported by enabling the module property on a style element within your SFC. Use the $style keyword to apply classes to a PrimeVue component. It is recommend to enable cssLayer when using CSS modules so that the PrimeVue styles have low CSS specificity.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Unstyled Mode
|
|
2
|
+
|
|
3
|
+
Theming PrimeVue with alternative styling approaches.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
The term unstyled is used to define an alternative styling approach instead of the default theming with design tokens. In unstyled mode the css variables of the design tokens and the css rule sets that utilize them are not included. Here is an example of an Unstyled Select, the core functionality and accessibility is provided whereas styling is not included. Unstyled components still need to be styled on your end, in the next sections, we'll cover the styling solutions for both modes.
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
Unstyled mode is enabled for the whole suite by enabling unstyled option during PrimeVue installation. Alternatively even in the default styled mode, a particular component can still be used as unstyled by adding the unstyled prop of the component. Check
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
Here is a sample that styles a button component with Tailwind CSS using pass through attributes. Before beginning, head over to the the pass through section at button documentation to learn more about the components internals section. We'll style the root element with pass through attributes, and apply utility classes directly to the icon and label placed in the default slot. Search
|
|
16
|
+
|
|
17
|
+
```vue
|
|
18
|
+
<template>
|
|
19
|
+
<Button unstyled pt:root="bg-teal-500 hover:bg-teal-700 active:bg-teal-900 cursor-pointer py-2 px-4 rounded-full border-0 flex items-center gap-2">
|
|
20
|
+
<Search class="text-white" :size="20" />
|
|
21
|
+
<span class="text-white font-bold text-lg">Search</span>
|
|
22
|
+
</Button>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup>
|
|
26
|
+
import Search from '@primeicons/vue/search';
|
|
27
|
+
<\/script>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Global
|
|
31
|
+
|
|
32
|
+
A global configuration can be created at application level to avoid repetition via the global pt option so that the styles can be shared from a single location. A particular component can still override a global configuration with its own pt property.
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
import { createApp } from "vue";
|
|
36
|
+
import PrimeVue from "primevue/config";
|
|
37
|
+
const app = createApp(App);
|
|
38
|
+
|
|
39
|
+
app.use(PrimeVue, {
|
|
40
|
+
unstyled: true,
|
|
41
|
+
pt: {
|
|
42
|
+
button: {
|
|
43
|
+
root: 'bg-teal-500 hover:bg-teal-700 active:bg-teal-900 cursor-pointer py-2 px-4 rounded-full border-0 flex gap-2',
|
|
44
|
+
label: 'text-white font-bold text-lg',
|
|
45
|
+
icon: 'text-white text-xl'
|
|
46
|
+
},
|
|
47
|
+
panel: {
|
|
48
|
+
header: 'bg-primary text-primary-contrast border-primary',
|
|
49
|
+
content: 'border-primary text-lg text-primary-700',
|
|
50
|
+
title: 'bg-primary text-primary-contrast text-xl',
|
|
51
|
+
pcToggleButton: {
|
|
52
|
+
root: 'bg-primary text-primary-contrast hover:text-primary hover:bg-primary-contrast'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Unstyled Mode
|
|
2
|
+
|
|
3
|
+
Theming PrimeVue with alternative styling approaches.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
The term unstyled is used to define an alternative styling approach instead of the default theming with design tokens. In unstyled mode the css variables of the design tokens and the css rule sets that utilize them are not included. Here is an example of an Unstyled Select, the core functionality and accessibility is provided whereas styling is not included. Unstyled components still need to be styled on your end, in the next sections, we'll cover the styling solutions for both modes.
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
Unstyled mode is enabled for the whole suite by enabling unstyled option during PrimeVue installation. Alternatively even in the default styled mode, a particular component can still be used as unstyled by adding the unstyled prop of the component. Check
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
Here is a sample that styles a button component with Tailwind CSS using pass through attributes. Before beginning, head over to the the pass through section at button documentation to learn more about the components internals section. We'll style the root element with pass through attributes, and apply utility classes directly to the icon and label placed in the default slot. Search
|
|
16
|
+
|
|
17
|
+
```vue
|
|
18
|
+
<template>
|
|
19
|
+
<Button unstyled pt:root="bg-teal-500 hover:bg-teal-700 active:bg-teal-900 cursor-pointer py-2 px-4 rounded-full border-0 flex items-center gap-2">
|
|
20
|
+
<Search class="text-white" :size="20" />
|
|
21
|
+
<span class="text-white font-bold text-lg">Search</span>
|
|
22
|
+
</Button>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup>
|
|
26
|
+
import Search from '@primeicons/vue/search';
|
|
27
|
+
<\/script>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Global
|
|
31
|
+
|
|
32
|
+
A global configuration can be created at application level to avoid repetition via the global pt option so that the styles can be shared from a single location. A particular component can still override a global configuration with its own pt property.
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
import { createApp } from "vue";
|
|
36
|
+
import PrimeVue from "primevue/config";
|
|
37
|
+
const app = createApp(App);
|
|
38
|
+
|
|
39
|
+
app.use(PrimeVue, {
|
|
40
|
+
unstyled: true,
|
|
41
|
+
pt: {
|
|
42
|
+
button: {
|
|
43
|
+
root: 'bg-teal-500 hover:bg-teal-700 active:bg-teal-900 cursor-pointer py-2 px-4 rounded-full border-0 flex gap-2',
|
|
44
|
+
label: 'text-white font-bold text-lg',
|
|
45
|
+
icon: 'text-white text-xl'
|
|
46
|
+
},
|
|
47
|
+
panel: {
|
|
48
|
+
header: 'bg-primary text-primary-contrast border-primary',
|
|
49
|
+
content: 'border-primary text-lg text-primary-700',
|
|
50
|
+
title: 'bg-primary text-primary-contrast text-xl',
|
|
51
|
+
pcToggleButton: {
|
|
52
|
+
root: 'bg-primary text-primary-contrast hover:text-primary hover:bg-primary-contrast'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Migration
|
|
2
|
+
|
|
3
|
+
Migration guide to PrimeVue v4.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
At PrimeTek, we have been developing UI component libraries since 2008. The web continues to undergo technological advancements, and as a result, we have to modernize and update our libraries to stay relevant. PrimeVue v4 is the next-generation version that fully embraces modern Web APIs and removes technical debt like the legacy-styled mode. Every component has been reviewed and enhanced. As part of our commitment to our products and the community, PrimeVue v3 will continue to be maintained until the end of 2024. The most notable feature is the new styled mode implementation. Previous iterations use SASS at an external repo called primevue-sass-theme which requires compilation of a theme.css a file. This file had to be included in the application and need to be swapped at runtime for basic tasks like dark mode or primary color changes. In v4, styled mode is now part of the core, SASS is not used at all, and a new design token based architecture that fully utilizes CSS variables has been created. The new API is modern and superior to the legacy styled mode. Names of some of the components have been changed to more common alternatives for example, Popover replaced OverlayPanel and InputSwitch is now called ToggleSwitch . Each component has been reviewed for a consistent naming between CSS class names and PT sections. An example would be the option element of a Select component that uses p-select-option for the class name. Components have been utilized more within other components, for instance Dialog close button is not actually a PrimeVue button so that closeButtonProps can be used to enable the features of button like outlined, raised and more. Whenever a component is using another component, in v3 the pt sections were causing confusion, to prevent this pc prefix is added to indicate that the PT section is actually a PrimeVue component, not a simple DOM element. This is especially useful because PT allows passing arbitrary attributes to DOM elements whereas if the element is actually a PrimeVue component, props can also be passed.
|
|
8
|
+
|
|
9
|
+
## Compatible
|
|
10
|
+
|
|
11
|
+
Renamed Components Old names are deprecated but still functional, migrate to new import paths instead e.g. primevue/calendar becomes primevue/datepicker . Calendar -> DatePicker . Dropdown -> Select . InputSwitch -> ToggleSwitch . OverlayPanel -> Popover . Sidebar -> Drawer . Deprecated Components Components that are deprecated since their functionality is provided by other components. Chips | Use AutoComplete with multiple enabled and typeahead disabled. TabMenu | Use Tabs without panels. Steps | Use Stepper without panels. InlineMessage | Use Message component. BadgeDirective | Use OverlayBadge instead. TabView | Use the new Tabs components. Accordion | Use with the new AccordionHeader and AccordionContent components. Important Tickets Issue tickets with detailed information about component internal changes. #5426 #5437
|
|
12
|
+
|
|
13
|
+
## Breaking
|
|
14
|
+
|
|
15
|
+
SASS Themes The styled mode theming has been reimplemented from scratch based on an all-new architecture. The theme.css and the primevue/resources do not exist anymore, so any imports of these assets needs to be removed. If you had a custom theme for v3, the theme needs to be recreated using the new APIs. See the customization section at styled mode for details. Removed Components TriStateCheckbox | Use Checkbox with indeterminate option. DataViewLayoutOptions | Use SelectButton instead. Removed APIs switchTheme function, use the new APIs like usePreset instead to dynamic theme switching. Relocated APIs Imports from primevue/api have been relocated to @primevue/core/api . Removed Files Themes under the primevue/resources path, migration to new styled mode is necessary. The legacy Tailwind preset at primevue/passthrough/tailwind . Message and InlineMessage InlineMessage is deprecated due to overlap with the Message . The spacing, closable and life properties of the Message have breaking changes to provide InlineMessage functionality. Default margin is removed, closable is false by default and messages do not disappear automatically. PT Section Names The experimental PassThrough feature is not production ready, there are changes on the PT section names due to alignment with CSS classes for certain components. If when component element is another PrimeVue component pc prefix is added for indication. Review the Pass Through section of a component for the new API. The Tailwind CSS presets for the unstyled mode are not updated to v4 yet. Removed Features Sidebar/Drawer size property is removed, use a responsive class utilty as replacement, demos have new examples. Rating cancel prop is removed as toggling the selected star value clears it. Inplace closable is removed in favor of templating and closeCallback prop. Removed Style Classes .p-link , use a button in link mode. .p-highlight , each component have its own class such as .p-select-option-selected . .p-fluid , use the new built-in fluid property of the supported components or the Fluid component. Nuxt Module The nuxt-primevue module has been replaced with the new @primevue/nuxt-module . The old module is still maintained for v3 users. PrimeFlex CSS In case you are using PrimeFlex CSS library, upgrade to PrimeFlex v4 since PrimeFlex v3 is not compatible with PrimeVue v4+.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Migration to v5
|
|
2
|
+
|
|
3
|
+
Migration guide to PrimeVue v5.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
PrimeVue v5 is the first release under the PrimeUI umbrella. Licensing moves to a dual Community/Commercial model. Read the full story for the background and road ahead. Breaking Changes PrimeVue follows semantic versioning , and this release introduces no breaking changes to the public component APIs. Existing applications should upgrade without code edits. If you encounter a regression that looks like a breaking change, please open an issue so we can address it. PRO Suite PrimeUI PRO is the new enterprise tier from PrimeTek, expanding the suite with production-ready components. Scheduler . Charts . Text Editor . Task Board . Diagram, on the roadmap DataGrid, on the roadmap Gantt Chart, on the roadmap PDF Viewer, on the roadmap New Components v5 introduces a fresh set of components: CommandMenu Compare Gallery InputTags InputPassword InputColor Sidebar ScrollArea Enhancements Several existing components have also been reworked: Carousel rebuilt around a compound API. Menu now supports multi-level navigation. Toast ships with new entry and exit animations. InputMask is now a directive rather than a component. Wide-ranging defect fixes across the suite. New documentation and demos. 16px Base PrimeVue sizes its components in rem units relative to the document root font size, now assumed to be 16px to match the browser default. Earlier versions assumed 14px, so every preset also ships a compat variant calibrated for a 14px root to keep existing layouts intact. See Base Font Size for technical details.
|
|
8
|
+
|
|
9
|
+
## Deprecations
|
|
10
|
+
|
|
11
|
+
The following APIs are marked as deprecated in v5 and will be removed in a future major version. They continue to function in v5 so you can migrate gradually. API Deprecated Since Replacement Removal Status MultiSelect v5 Select component with multiple property v6 Galleria v5 Gallery component v6 Image v5 Gallery component v6 ColorPicker v5 InputColor component v6 ImageCompare v5 Compare component v6 ScrollPanel v5 ScrollArea component v6 Password v5 InputPassword component v6 InputMask v5 Mask directive v6 PanelMenu v5 Menu component with toggleable option v6 Chart v5 PrimeUI PRO Charts v6 Editor v5 PrimeUI PRO Editor v6 @primevue/icons package v5 SVG icons via @primeicons/vue v6 AutoComplete multiple property v5 InputTags component with typeahead v6 Button label , icon , iconPos , iconClass properties v5 Place the icon and label directly inside the default slot, ordering them as needed v6 Button badge , badgeClass , badgeSeverity properties v5 Compose a Badge component inside the default slot v6 Button loading and loadingIcon properties v5 Render your own spinner inside the default slot and toggle disabled v6 Tabs scrollable property v5 Scrolling is now the default behavior if necessary v6 Carousel data-driven ( value ) usage v5 Compound API with CarouselContent , CarouselItem and CarouselIndicators helpers. v6
|
|
12
|
+
|
|
13
|
+
## Removals
|
|
14
|
+
|
|
15
|
+
The list of items that were deprecated in previous releases and removed in this iteration. API Deprecated In Replacement Status Calendar v4 DatePicker component Dropdown v4 Select component Chips v4 InputTags component InputChips v4 InputTags component InputSwitch v4 ToggleSwitch component OverlayPanel v4 Popover component TabView v4 Tabs component AccordionTab v4 Accordion with AccordionPanel / AccordionHeader / AccordionContent BadgeDirective ( v-badge ) v4 OverlayBadge component InlineMessage v4 Message component TabMenu v4 Tabs component (without panels) AutoComplete removeTokenIcon property and removetokenicon slot v4 chipIcon property and chipicon slot AutoComplete item-select / item-unselect events v4 option-select / option-unselect events AutoComplete loadingIcon property and loadingicon slot v4 loader property and loader slot AutoComplete dropdownbutton slot v4 dropdown slot Accordion activeIndex property and update:activeIndex / tab-open / tab-close / tab-click events v4 value property and update:value event Button plain property v4 contrast severity PrimeVue config inputStyle option v4 inputVariant option CascadeSelect panelStyle / panelClass / panelProps properties v4 overlayStyle / overlayClass / overlayProps properties Select panelStyle / panelClass properties v4 overlayStyle / overlayClass properties InputNumber incrementButtonIcon / decrementButtonIcon properties and incrementbuttonicon / decrementbuttonicon slots v4 incrementIcon / decrementIcon properties and incrementicon / decrementicon slots Column rowtogglericon / nodetogglericon slots v4 rowtoggleicon / nodetoggleicon slots DataTable reorderindicatorupicon / reorderindicatordownicon slots v4 rowreorderindicatorupicon / rowreorderindicatordownicon slots Tree searchicon / togglericon / nodetogglericon slots v4 filtericon / nodetoggleicon slots TreeSelect itemtogglericon slot v4 itemtoggleicon slot TreeSelect triggericon slot v4 dropdownicon slot Dock icon slot v4 itemicon slot Menu submenuheader slot v4 submenulabel slot Menubar menubutton / menubuttonicon slots v4 button / buttonicon slots MegaMenu menubutton / menubuttonicon slots v4 button / buttonicon slots Message sticky property v4 life property to control auto-close UniqueComponentId utility ( @primevue/core/utils ) v4 uuid from @primeuix/utils Component instance hasFluid getter (BaseInput) v4 $fluid Component instance filled getter (BaseEditableHolder) v4 $filled Root element $pc marker (set on each component's root DOM element) v4 No replacement (internal) Paginator firstpagelinkicon / prevpagelinkicon / nextpagelinkicon / lastpagelinkicon slots v4 firsticon / previcon / nexticon / lasticon slots Panel / Fieldset togglericon slot v4 toggleicon slot SplitButton menubuttonicon slot v4 dropdownicon slot Toast icon slot v4 messageicon slot OrderList / PickList item slot v4 option slot TabPanel header / headerStyle / headerClass / headerProps / headerActionProps / contentStyle / contentClass / contentProps / disabled properties and header slot (TabView-only) v4 Tabs structure ( Tab / TabList / TabPanels ) switchTheme function v4 usePreset and related theme APIs primevue/themes presets v4 @primeuix/themes nuxt-primevue module v4 @primevue/nuxt-module
|