Reka UI logoReka
backdrop
概览

安装

一个快速教程,逐步讲解如何安装软件包以及支持的插件。

安装软件包

NPM Downloads

sh
$ npm add reka-ui

Nuxt 模块

Reka UI 提供 Nuxt 模块支持。

在 `nuxt.config.ts` 中,只需将 `reka-ui/nuxt` 添加到模块中,它将自动为您导入所有组件。

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

unplugin-vue-components

Reka UI 还为流行的 unplugin-vue-components 提供了解析器。

在 `vite.config.ts` 中,导入 `reka-ui/resolver`,并进行相应配置,它将自动导入 Reka UI 中的所有组件。

ts
import Components from 'unplugin-vue-components/vite'
import RekaResolver from 'reka-ui/resolver'

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

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