Skip to content
Maz-UI v4.0.0

Maz-UI v4.0.0 - The Complete Rebuild ​

After months of development, I'm announcing Maz-UI v4.0.0 — a complete architectural rebuild focused on performance, modularity, and developer experience.

Why I Built v4.0.0 ​

Modern applications require better performance, smaller bundle sizes, and improved developer tooling. Maz-UI v3 served its purpose, but I wanted to address these requirements with a ground-up rebuild.

The goals were: Better tree-shaking, modular architecture, and enhanced TypeScript support.

What's New ​

Modular Architecture ​

Maz-UI v4 uses a monorepo structure where every component, composable, directive, and utility can be imported independently. This gives you better control over your bundle size.

Bundle Size Improvements ​

Optimal tree-shaking implementation results in 60-90% bundle size reductions compared to v3. You can now import exactly what you need.

typescript
// Before v4: Large bundle with unused code
import * as MazUI from 'maz-ui/components'

// v4: Surgical imports for minimal bundles
import MazBtn from 'maz-ui/components/MazBtn'
import { useToast } from 'maz-ui/composables'
import { formatCurrency } from 'maz-ui/utils'

Theme System ​

Four Theme Presets ​

Choose from four pre-built themes:

  • Maz-UI: Vibrant and modern with signature Maz-UI aesthetics
  • Pristine: Minimalist elegance
  • Ocean: Fresh aquatic theme with deep blues and coral accents
  • Obsidian: Sophisticated dark theme focused on readability

HSL CSS Variables & Smart Dark Mode ​

The theming system uses HSL variables for flexibility, with automatic color scale generation (50-950) and dark mode support.

typescript
import { MazUi } from 'maz-ui/plugins/maz-ui'
import { ocean } from '@maz-ui/themes/presets'

app.use(MazUi, {
  theme: {
    preset: ocean,
    strategy: 'hybrid', // Optimal performance
    darkModeStrategy: 'class'
  }
})

Internationalization ​

Multi-language Support ​

Support for 9 languages: English, French, German, Spanish, Italian, Portuguese, Japanese, and Chinese, with custom language integration.

typescript
import { MazUi } from 'maz-ui/plugins/maz-ui'
import { fr, en } from '@maz-ui/translations'

app.use(MazUi, {
  translations: {
    locale: 'fr',
    fallbackLocale: 'en',
    messages: { fr, en }
  }
})

Specialized Ecosystem Packages ​

  • @maz-ui/icons - 860+ Icons SVG icon library with Vue components, direct SVG files, and auto-import support.

  • @maz-ui/nuxt - Nuxt Integration Nuxt module with auto-imports and SSR support.

  • @maz-ui/themes - Theming System Pre-built theme collections and design tokens.

  • @maz-ui/translations - Internationalization Lightweight i18n system for Maz-UI components.

  • @maz-ui/mcp - MCP Server Model Context Protocol server that connects AI agents to Maz-UI documentation.

New & Enhanced Components ​

  • MazPopover - Overlay Component Popover with positioning, trigger modes, and accessibility features.

  • MazSelectCountry - Country Selector Country/language selector with i18n support and flag display.

  • MazLink - Link Component Replaces MazBtn variant="link" with auto-external detection and icons.

  • MazExpandAnimation - CSS Grid Animations Replaces MazTransitionExpand with v-model control and timing functions.

  • MazDropzone - File Upload Rewritten without external dependencies, featuring auto-upload and event handling.

Performance Improvements ​

Metricv3.xv4.0.0Improvement
Bundle Size~500KB~50-200KB60-90% reduction
Tree-shakingLimitedOptimalPerfect granular imports
TypeScriptGoodExcellentStrict types with auto-completion
Build SpeedStandardEnhancedFaster compilation

Developer Experience ​

TypeScript-First Architecture ​

All components, composables, and utilities include TypeScript definitions with IDE auto-completion. Types are prefixed with Maz for consistency.

Auto-Import Resolvers ​

Integration with unplugin-vue-components and unplugin-auto-import for auto-imports.

Composable-Based Architecture ​

Several utilities are now Vue composables:

typescript
// Before: Utility function
import { idleTimeout } from 'maz-ui'

// v4: Vue composable with reactive state
import { useIdleTimeout } from 'maz-ui/composables'
const { isIdle } = useIdleTimeout({ timeout: 5000 })

Enhanced Development Tools ​

  • Nuxt DevTools integration
  • Interactive documentation with live examples
  • Comprehensive migration guides
  • MCP server for AI-assisted development

Key Features ​

Modular ​

Import individual components without the entire library. Tree-shaking ensures minimal bundle size.

SSR Compatible ​

Compatible with Nuxt and server-side rendering.

TypeScript Support ​

Built with TypeScript with auto-completion and type safety.

Theming System ​

HSL-based theming with CSS custom properties and multiple rendering strategies.

Dark Mode ​

Components support light and dark themes with system preference detection.

Complete Ecosystem ​

Components, plugins, directives, composables, and utilities.

Getting Started ​

For Vue Projects ​

bash
npm install maz-ui@4.0.0
typescript
// main.ts
import { createApp } from 'vue'
import { MazUi } from 'maz-ui/plugins/maz-ui'
import { mazUi } from '@maz-ui/themes/presets'
import { fr } from '@maz-ui/translations'
import 'maz-ui/styles'

const app = createApp(App)

app.use(MazUi, {
  theme: { preset: mazUi },
  translations: {
    locale: 'fr',
    fallbackLocale: 'en',
    messages: { fr }
  }
})

app.mount('#app')

For Nuxt Projects ​

bash
npm install @maz-ui/nuxt
typescript
// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@maz-ui/nuxt'],
})

Migration Resources ​

To help with migration from v3 to v4:

Summary ​

Maz-UI v4.0.0 is a complete rebuild focusing on performance, modularity, and developer experience. The new architecture provides better tree-shaking, smaller bundles, and improved TypeScript support.

Whether you're building a small project or large application, v4 offers the components and tools you need with better performance characteristics.

Get Started ​

Ready to try Maz-UI v4.0.0?


Feel free to share your feedback and contribute to the project on GitHub.