From 9505bf091d09792d7f7c2d3a8181bd88bce74923 Mon Sep 17 00:00:00 2001
From: Cagatay Civici
@@ -21,33 +21,36 @@ npm install primeicons --save
recommended to add PrimeFlex as it is likely to need such utilities when developing applications. View the
-npm install primevue@^3.0.0 --save
+npm install primevue@^3.1.0 --save
npm install primeicons --save
This is the recommended way if your application uses vue-cli or has a webpack based build with vue-loader configured. - Import the components as .vue files for seamless integration within your project where path of each component is available at the "import" section of a component documentation.
+This is the recommended way if your application uses vue-cli or has a webpack based build with vue-loader configured.
-
-
-//import ComponentName from 'primevue/componentname';
-
-import Dialog from 'primevue/dialog';
-
-
-
- In the next step, register the component with the tag name you'd like to use.
+Begin with installing PrimeVue with the use function.
import {createApp} from 'vue';
+import PrimeVue from 'primevue/config';
const app = createApp(App);
-app.component('Dialog', Dialog);
-
+app.use(PrimeVue);
+
+
+ Then import the component you need and registering it so that you'll be able to utilize the component in your application.
+
+
+import {createApp} from 'vue';
+import PrimeVue from 'primevue/config';
+import Dialog from 'primevue/dialog';
+const app = createApp(App);
+
+app.use(PrimeVue);
+
+app.component('Dialog', Dialog);
- Then you'll be able to utilize the component in your application.
<Dialog></Dialog>
-
+
Other alternative is utilizing the components directly within the browser with UMD packages.
@@ -179,17 +182,21 @@ primevue/resources/themes/rhea/theme.cssRipple is an optional animation for the supported components such as buttons. It is disabled by default and needs to be enabled at - your app's entry file (e.g. main.js) using the $primevue global variable. + your app's entry file (e.g. main.js) during the PrimeVue setup.
import {createApp} from 'vue';
+import PrimeVue from 'primevue/config';
const app = createApp(App);
-app.config.globalProperties.$primevue = {ripple: true};
+app.use(PrimeVue, {ripple: true});
+ PrimeVue provides a Locale API to support i18n and l7n, visit the
An example application based on vue-cli is available at github.