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
$ npm add radix-vue

Nuxt modules

Radix Vue offers Nuxt modules support.

In nuxt.config.ts, simply add radix-vue/nuxt into the modules, and it will auto-imports all the components for you.

ts
export default defineNuxtConfig({
  modules: ['radix-vue/nuxt'],
})

unplugin-vue-components

Radix Vue also has resolver for the popular unplugin-vue-components.

In vite.config.ts, import radix-vue/resolver, and configure as such and it will auto-imports all the components from Radix Vue.

ts
import Components from 'unplugin-vue-components/vite'
import RadixVueResolver from 'radix-vue/resolver'

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

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