透過 100 多個技巧的集合學習 Nuxt!

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