W-Component-Vue

2.4.53 · maintenance · verified Sun Apr 19

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.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to globally register and use several W-Component-Vue components (w-text, w-button, w-input) within a basic Vue 2 application.

import Vue from 'vue';
import WComponentVue from 'w-component-vue';

// Optional: Link icon fonts for components that use them
// Ensure these are included in your HTML or loaded via a build process
// import '@mdi/font/css/materialdesignicons.min.css';
// import '@fortawesome/fontawesome-free/css/all.min.css';

Vue.use(WComponentVue);

new Vue({
  el: '#app',
  data: {
    message: 'Hello from W-Component-Vue!'
  },
  template: `
    <div id="app">
      <w-text
        :text="message"
        :level="1"
        :type="'primary'"
      ></w-text>
      <w-button
        text="Click Me"
        :type="'success'"
        @click="message = 'Button clicked!'"
      ></w-button>
      <w-input
        :value="message"
        @input="message = $event"
        label="Your message"
      ></w-input>
    </div>
  `
});

view raw JSON →