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-nuxtnuxt.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