shadcn-nuxt

使用 Radix Vue 和 Tailwind CSS 構建的可複用元件。

Shadcn Nuxt

npm versionnpm downloadsLicenseNuxt

Nuxt 的 Shadcn Vue 模組。

功能

  • ⛰ 自動匯入正確和相關的元件
  • 更多功能即將推出...

快速設定

  1. shadcn-nuxt 依賴項新增到您的專案中
# Using pnpm
pnpm add -D shadcn-nuxt

# Using yarn
yarn add --dev shadcn-nuxt

# Using npm
npm install --save-dev shadcn-nuxt
  1. shadcn-nuxt 新增到 nuxt.config.tsmodules 部分
export default defineNuxtConfig({
  modules: [
    'shadcn-nuxt'
  ],
  shadcn: {
    /**
     * Prefix for all the imported component
     */
    prefix: '',
    /**
     * Directory that the component lives in.
     * @default "./components/ui"
     */
    componentDir: './components/ui'
  }
})

大功告成!現在您可以在您的 Nuxt 應用程式中使用 Shadcn Nuxt 了 ✨

開發

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release