Overview
Hello Vue Components is a component library built with Vue CLI 3. It offers a collection of reusable Vue components that can be easily integrated into your web application.
Features
- Easy to use: Simply drop the library in with a <script> tag alongside Vue to globally install all components.
- Modular installation: Install the library with NPM and register it as a plugin to globally install all components or import components individually for local registration.
- Individually packaged components: If you only want to use a small subset of components, you can reduce the size of your application by only importing individually packaged components.
Installation
To use Hello Vue Components, you have multiple options depending on your project setup.
Directly in the browser
Drop the library in with a <script> tag alongside Vue to globally install all components:
<script src="path/to/vue.js"></script>
<script src="path/to/hello-vue-components.js"></script>
Or, if you only want to use a small subset of components, drop them in individually:
<script src="path/to/vue.js"></script>
<script src="path/to/component1.js"></script>
<script src="path/to/component2.js"></script>
<!-- Add more components as needed -->
In a module system
Install the library with NPM:
npm install hello-vue-components
Then register the library as a plugin to globally install all components:
import HelloVueComponents from 'hello-vue-components';
import Vue from 'vue';
Vue.use(HelloVueComponents);
Or, import components individually for local registration:
import { Component1, Component2 } from 'hello-vue-components';
import Vue from 'vue';
Vue.component('Component1', Component1);
Vue.component('Component2', Component2);
// Register more components as needed
Individually packaged components
If you only want to use a small subset of components, only import individually packaged components to reduce the size of your application. This approach requires using a module system.
import Component1 from 'hello-vue-components/Component1';
import Component2 from 'hello-vue-components/Component2';
// Import more components as needed
Summary
Hello Vue Components is a versatile component library for Vue.js. Its easy-to-use nature, modular installation options, and ability to individually package components make it a convenient choice for integrating reusable components into your Vue projects.