hui-nuxt
v1.1.7
Published
Add hui-kit module to Nuxt
Readme
Hui Nuxt
Hui Vue module for Nuxt.
Features
- ⛰ Auto-import correct and relevant components
- more to come...
Quick Setup
- Add
hui-nuxtdependency to your project
# Using pnpm
pnpm add -D hui-nuxt
# Using yarn
yarn add --dev hui-nuxt
# Using npm
npm install --save-dev hui-nuxt- Add
hui-nuxtto themodulessection ofnuxt.config.ts
export default defineNuxtConfig({
modules: [
'hui-nuxt'
],
hui: {
/**
* 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 Hui Nuxt in your Nuxt app ✨
Multiple component directories
Projects that split their base UI components from custom extensions can configure multiple directories, each with its own optional prefix:
export default defineNuxtConfig({
modules: ['hui-nuxt'],
hui: {
prefix: 'Ui',
componentDir: [
'@/components/ui',
{
path: '@/components/ai',
prefix: 'Ai',
},
],
},
})Each directory is ignored by Nuxt's default auto-import scanning and re-registered through the module, ensuring clean separation without console warnings.
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