Nuxt Nation カンファレンスが開催されます。11 月 12 日から 13 日に参加しましょう。

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. nuxt.config.tsmodules セクションに shadcn-nuxt を追加します
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