W-Component-Vue is a collection of user interface components specifically designed for Vue.js version 2.x, currently at stable version 2.4.53. It offers various reusable components that can be easily integrated into Vue 2 applications, supporting both ES module imports for modern build setups and UMD modules for direct browser inclusion via CDN. The library emphasizes simplicity in its components and provides a straightforward installation and usage model, either by globally registering all components with `Vue.use()` or by importing individual components for granular control. While the library itself is functional, it is important to note that Vue 2 reached its End of Life (EOL) on December 31st, 2023. This means W-Component-Vue is primarily suited for maintaining existing Vue 2 projects, and new development in the Vue ecosystem should target Vue 3.
npm install w-component-vueVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to globally register and use several W-Component-Vue components (w-text, w-button, w-input) within a basic Vue 2 application.
For new projects, use Vue 3 and Vue 3-compatible component libraries. For existing Vue 2 projects, consider a Vue 3 migration or explore extended support options for Vue 2 if security updates are critical.
Ensure your project's build configuration includes `vue-loader` or equivalent for processing `.vue` files. Alternatively, use the global `Vue.use(WComponentVue)` approach to avoid direct SFC imports, or use the UMD bundle in a browser environment.
Manually include the required icon font CSS in your project's HTML file or import them into your main CSS/SCSS entry point, as shown in the README's UMD examples for `@mdi/font` and `@fortawesome/fontawesome-free`.
Ensure you have called `Vue.use(WComponentVue)` after importing, or registered individual components using `Vue.component('w-text', WText)` or via the `components` option in your Vue instance/component.In a browser, ensure the `<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js"></script>` tag comes *before* the `w-component-vue` script. In an ES module environment, make sure `import Vue from 'vue'` is present.
Configure your bundler (Webpack, Vite, Rollup) with the appropriate Vue plugin/loader (`vue-loader` for Webpack, `@vitejs/plugin-vue` for Vite) to process `.vue` files. If you don't have a build step, use the global `Vue.use(WComponentVue)` registration or the UMD bundle.