Sakai is an application template for Vue based on the create-vue, the recommended way to start a Vite-powered Vue projects. To get started, clone the repository from GitHub and install the dependencies with npm or yarn.
git clone https://github.com/primefaces/sakai-vue
npm install
npm run dev
Navigate to http://localhost:5173/ to view the application in your local environment.
npm run dev
Templates consists of a couple folders, demos and layout have been separated so that you can easily remove what is not necessary for your application.
Main menu is defined at src/layout/AppMenu.vue file. Update the model property to define your own menu items.
The src/layout/composables/layout.js is a composable that manages the layout state changes including dark mode, PrimeVue theme, menu modes and states. If you change the initial values like the preset or colors, make sure to apply them at PrimeVue config at main.js as well.
The demo pages are developed with Tailwind CSS however the core application shell mainly uses custom CSS.
CSS variables used in the template derive their values from the PrimeVue styled mode presets, use the files under assets/layout/_variables.scss to customize according to your requirements.
To get started, create a Nuxt project.
npx nuxi@latest init sakai-nuxt
Add Prime related libraries to the project.
npm install primevue @primevue/themes tailwindcss-primeui primeicons
npm install --save-dev @primevue/nuxt-module
Add PrimeVue-Nuxt module to nuxt.config.js
modules: [
'@primevue/nuxt-module',
]
Install Tailwind CSS with Nuxt using official documentation.
Add tailwindcss-primeui package as a plugin to tailwind.config.js
plugins: [require('tailwindcss-primeui')]
Add PrimeVue to in nuxt.config.js
import Aura from '@primevue/themes/aura';
primevue: {
options: {
theme: {
preset: Aura,
options: {
darkModeSelector: '.app-dark'
}
}
}
}
Copy src/assets folder and paste them to assets folder to your Nuxt project. And add to nuxt.config.js
css: ['~/assets/tailwind.css', '~/assets/styles.scss']
Change app.vue
<template>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>
Create layouts/default.vue and paste this code:
<script setup>
import AppLayout from './AppLayout.vue';
</script>
<template>
<AppLayout />
</template>
Create layouts folder and copy src/layout folder and paste them. And then create composables/use-layout.vue and replace it with src/layout/composables/layout.js. Then remove this line:
import { useLayout } from '@/layout/composables/layout';
As a final step, copy the following folders: