Install and use PrimeVue Library in Vue project.

PrimeVue is a rich set of open source UI components for Vue.

  • Run the following command in your command line.

npm install primevue
  • Add provided code in main.js
import PrimeVue from 'primevue/config';

const app = createApp(App);
app.use(PrimeVue);
  • To import components of Primevue to use it, add provided code in main.js. Take Button as example.
import Button from 'primevue/button';
app.component('Button',Button);
  • Use the component in Vue file as provided.
<AutoComplete v-model="value" :suggestions="items" @complete="search" />

Leave a comment

Your email address will not be published. Required fields are marked *