✨ The Ultimate Nuxt Module for Beautiful Vue.js Components ✨
Transform your Nuxt application with Maz-UI - a comprehensive Vue.js component library that makes building beautiful interfaces effortless!
Maz-UI is a powerful Vue.js component library with 50+ beautiful components, 20+ useful composables, and smart directives that work perfectly with Nuxt. Think of it as your design system in a box!
# Choose your package manager
npm install @maz-ui/nuxt
# or
pnpm add @maz-ui/nuxt
# or
yarn add @maz-ui/nuxt
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@maz-ui/nuxt'],
})
That's it! 🎉 All components, composables, and features are now available in your app!
<script setup>
// All composables are auto-imported too!
const toast = useToast()
const { isDark, toggleDarkMode } = useTheme()
function showMessage() {
toast.success('Welcome to Maz-UI! 🎉')
}
</script>
<template>
<div>
<!-- All components are auto-imported! -->
<MazBtn color="primary" @click="showMessage">
Click me!
</MazBtn>
<!-- Composables work everywhere -->
<MazCard class="mt-4">
<h2>Welcome to Maz-UI!</h2>
<p>Current theme: {{ isDark ? 'Dark' : 'Light' }}</p>
</MazCard>
<!-- Directives are ready to use -->
<div v-tooltip="'Hello World!'">
Hover me for tooltip
</div>
</div>
</template>
MazBtn,MazInput, MazSelect, MazCheckbox, MazRadio, MazTextarea, MazInputPhoneNumberMazDropdown, MazPopoverMazTabs, MazStepper, MazPaginationMazTable, MazCard, MazBadge, MazAvatarMazCarousel, MazGallery, MazLazyImgMazDialog, MazToast, MazSpinner, MazLoadingBarMazChart (with Chart.js integration)useTheme() - Theme management and dark modeuseToast() - Beautiful toast notificationsuseDialog() - Modal dialogs made easyuseAos() - Smooth scroll animationsuseTimer() - Countdown and timer functionalityuseWindowSize() - Reactive window dimensionsuseBreakpoints() - Responsive design helpersv-tooltip - Beautiful tooltips anywherev-lazy-img - Lazy load images automaticallyv-zoom-img - Click to zoom imagesv-click-outside - Detect outside clicksv-fullscreen-img - Fullscreen image viewerMaz-UI comes with a powerful theming system that makes your app look professional instantly:
<script setup>
// Switch between built-in themes
const { updateTheme, toggleDarkMode } = useTheme()
async function changeToOceanTheme() {
const { ocean } = await import('@maz-ui/themes')
updateTheme(ocean)
}
</script>
<template>
<div>
<MazBtn @click="toggleDarkMode">
🌙 Toggle Dark Mode
</MazBtn>
<MazBtn @click="changeToOceanTheme">
🌊 Ocean Theme
</MazBtn>
</div>
</template>
Built-in themes: mazUi, ocean, pristine, obsidian + create your own!
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@maz-ui/nuxt'],
mazUi: {
// General Settings
general: {
autoImportPrefix: 'Maz', // useMazToast instead of useToast
defaultMazIconPath: '/icons', // Path to your SVG icons
devtools: true, // Enable DevTools integration
},
// Theme System
theme: {
preset: 'ocean', // Choose: 'mazUi', 'ocean', 'pristine', 'obsidian'
strategy: 'hybrid', // 'runtime' | 'buildtime' | 'hybrid'
darkModeStrategy: 'class', // 'class' | 'media' | 'auto'
},
// Translations
translations: {
locale: 'fr', // Default language
fallbackLocale: 'en',
},
// Components (all enabled by default)
components: {
autoImport: true, // Auto-import all components globally
},
// Composables (customize what you need)
composables: {
useTheme: true,
useToast: true,
useDialog: true,
useAos: {
injectCss: true, // Include AOS animations CSS
router: true, // Re-trigger on route change
},
// ... all others enabled by default
},
// Directives
directives: {
vTooltip: true,
vLazyImg: { threshold: 0.1 }, // Custom intersection threshold
vClickOutside: true,
vFullscreenImg: true,
vZoomImg: true,
},
},
})
import { definePreset } from '@maz-ui/themes'
// themes/my-theme.ts
export const myCustomTheme = definePreset({
base: 'maz-ui',
overrides: {
colors: {
primary: '350 100% 50%',
secondary: '350 14% 96%',
background: '0 0% 100%',
// ... more colors
},
},
})
// nuxt.config.ts
import { myCustomTheme } from './themes/my-theme'
export default defineNuxtConfig({
modules: ['@maz-ui/nuxt'],
mazUi: {
theme: {
preset: myCustomTheme,
},
},
})
This module is built specifically for Nuxt with perfect SSR and SSG support:
nuxt generate| Feature | Manual Setup | @maz-ui/nuxt Module |
|---|---|---|
| Setup Time | 30+ minutes | 2 minutes |
| Auto Imports | Manual imports needed | ✅ Everything auto-imported |
| SSR Support | Complex configuration | ✅ Works out of the box |
| Theme System | Manual CSS management | ✅ Automatic theme switching |
| Bundle Size | Full library imported | ✅ Tree-shaking optimized |
| DevTools | No integration | ✅ Nuxt DevTools support |
| TypeScript | Manual type setup | ✅ Perfect TypeScript support |
We love contributions! Check out our Contributing Guide.
MIT License © 2025 LouisMazel
Built with ❤️ for the Vue.js and Nuxt community