Add a PrimeVue library component to an HTML page that uses Vue.js.

Add the script below for using primevue.

<script src="https://unpkg.com/primevue/umd/primevue.min.js"></script>
<script src="https://unpkg.com/@primevue/themes/umd/aura.min.js"></script>

const { createApp } = Vue;
const app = createApp({

})
app.use(PrimeVue.Config, {
        theme: {
            preset: PrimeVue.Themes.Aura,
            options: {
                darkModeSelector: false || 'none',
            }
        },
    });
    app.component('p-datepicker', PrimeVue.DatePicker);
    app.component('p-dialog', PrimeVue.Dialog);
    app.mount('#app');

Leave a comment

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