Vue3-MQ is a robust Vue 3 plugin designed to simplify responsive design implementation in web applications by providing reactive access to media query states. It allows developers to define custom breakpoints or utilize a variety of built-in presets, including Bootstrap 4/5, Tailwind, Vuetify 3/4, MUI, and Bulma. The current stable version is 4.1.0, which introduced new presets and a `mergeBreakpoints` configuration option. The library maintains an active release cadence, with consistent minor and patch updates following significant major versions like v3 ("The Reimagining") and v4 (ESM-first, modern stack updates). Its key differentiators include the `<MqLayout>` component, which supports various selectors (single, array, range, plus, minus, and breakpoint slots) for declarative conditional rendering, and a reactive environment analysis object that can also detect user preferences for light/dark themes, screen orientation, and reduced motion. It provides a comprehensive, component-driven approach to adapting application UI to diverse browser environments effectively.
npm install vue3-mqVerified import paths — ran on the pinned version, not inferred.
Demonstrates plugin installation, global breakpoint configuration, and basic usage of the `MqLayout` component and `useMq` composable for responsive rendering based on screen size.
Ensure you are using ESM `import` statements for `vue3-mq` throughout your project. Update bundler configurations if necessary to handle ESM modules correctly.
Refer to the official documentation for Vue3-MQ v3 for updated API usage, component props, and configuration options when upgrading from v2.x.
Upgrade to `vue3-mq@4.0.3` or a newer version to resolve the global type declaration conflict.
Upgrade to `vue3-mq@3.1.1` or a newer version to ensure proper handling of runtime breakpoint updates without errors.
Ensure your project is configured for ESM, and you are consistently using `import { createMq } from 'vue3-mq';` for plugin instantiation, especially since v4.0.0.Upgrade your `vue3-mq` package to version `4.0.3` or higher to fix the global type declaration issue that was overwriting Vue's types.
Ensure `app.use(createMq, { ... })` is correctly called in your `main.ts`/`main.js` file, and `MqLayout` is explicitly imported and added to the `components` option in your component if not globally registered.