* chore: add dev:nuxt script * chore(module): add `.npmrc` to playground * chore: bump 'nuxtjs/tailwindcss' and add it to modules * chore: add schema to components.json * chore: bump playground deps * fix: add missing tailwind.css by the cli * chore: bump tailwind config * chore(playground): bump Button component * chore: add comments * refactor: simplify components registration * chore(module): bump deps * chore(module): remove `oxc-parser` * chore: dedupe * feat(module): auto generate `lib/utils` * feat(module): refresh playground style and dark mode * chore: revert components registration and link the comment * chore: readd oxc-parser * chore: bump vitest |
||
|---|---|---|
| .. | ||
| playground | ||
| src | ||
| test | ||
| .gitignore | ||
| .npmrc | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Shadcn Nuxt
Shadcn Vue module for Nuxt.
Features
- ⛰ Auto-import correct and relevant components
- more to come...
Quick Setup
- Add
shadcn-nuxtdependency to your project
# Using pnpm
pnpm add -D shadcn-nuxt
# Using yarn
yarn add --dev shadcn-nuxt
# Using npm
npm install --save-dev shadcn-nuxt
- Add
shadcn-nuxtto themodulessection ofnuxt.config.ts
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'
}
})
That's it! You can now use Shadcn Nuxt in your Nuxt app ✨
Development
# 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