Skip to content

Installation

A quick tutorial to walk through installing the packages, as well as the supported plugins.

Installing the package

NPM Downloads

sh
sh
$ npm add @oku-ui/primitives

Nuxt modules

Oku Primitives offers Nuxt modules support.

In nuxt.config.ts, simply add @oku-ui/primitives/nuxt into the modules, and it will auto-imports all the components for you.

ts
ts
export default defineNuxtConfig({
  modules: ['@oku-ui/primitives/nuxt'],
})

unplugin-vue-components

Oku Primitives also has resolver for the popular unplugin-vue-components.

In vite.config.ts, import @oku-ui/primitives/resolver, and configure as such and it will auto-imports all the components from Oku Primitives.

ts
ts
import Components from 'unplugin-vue-components/vite'
import OkuPrimitivesResolver from '@oku-ui/primitives/resolver'

export default defineConfig({
  plugins: [
    vue(),
    Components({
      dts: true,
      resolvers: [
        OkuPrimitivesResolver()

        // OkuPrimitivesResolver({
        //   prefix: '' // use the prefix option to add Prefix to the imported components
        // })
      ],
    }),
  ],
})