VueJS - 5 utilities you're likely to need
Tags: vue, javascript, development, beginners
Published: 2021-07-02 17:45:39

If you ever need to build an administrative tool using [VueJS](https://vuejs.org/), you will probably need a few third-party components to help you deal with some complex user-interface behaviors.

You can always build everything from scratch but if you, like me, work for a big company where time is money and productivity must be kept high, it is likely for you to look in the community for some components and libraries capable of speeding things up for you a little bit.

### TL;DR
In this article I'm going to introduce you to 5 very useful third-party components that almost every administrative tool tend to require.
Notice that I'm not saying that they are the only options for solving the problems they intend to but, as I've already used them (and still do!) and they worked like a charm, I decided to share.


### Content Placeholders

Have you ever noticed the "skeleton" that is displayed for you by Facebook or LinkedIn, for example, while their page is loading?
They are called placeholders and they are there to provide you prompt feedback and indicate where data will be put to when it's been fully loaded.
It's very nice to prevent the user from thinking the page has frozen while there is still nothing to be displayed.

Within VueJS context, you'll probably find several other packages that do that but [`vue-content-placeholders`](https://github.com/michalsnik/vue-content-placeholders) is likely to be the one you look for.

They allow you to display placeholders in the most common formats such as images, text and even both of them combined.
They are pretty easy to install and use.

This is how it looks like (one of its possibilities):

<img src="https://camo.githubusercontent.com/1cb894e5bda5cf9f0767c18d7d175f2fe68eedd04c650e1afb4e3a3fdd4662b0/68747470733a2f2f692e696d6775722e636f6d2f4a516c466a73532e676966" />

_Source: [https://github.com/michalsnik/vue-content-placeholders](https://github.com/michalsnik/vue-content-placeholders)_


### Vue Select

Tell me about one single application that does not need a select list. It's almost impossible to think that your system will not require this kind of component. 
We all know that the [HTML default select element](https://www.w3schools.com/tags/tag_select.asp) (and some other elements as well) is not smart enough. We don't have an integrated search or even a dynamic content loading that uses[AJAX](https://www.w3schools.com/xml/ajax_intro.asp) amongst other things.

It was with the intention of solving some of these problems that [Vue Select](https://vue-select.org/) was created.
It is a very complete and smart select list component that provides, among several other things:

- integrated search
- dynamic AJAX content loading
- custom labels and icons
- custom selection value (easily)

It is really easy to install and implement and their documentation is full of nice examples of what the component is capable of.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/74bj80dzhuvpoedtirrb.png)

_Source: [https://vue-select.org/guide/validation.html#required](https://vue-select.org/guide/validation.html#required)_ 

### Vue Tree Select
If you've ever needed to implement a component to display a tree structure you know how challenging it is.
Besides the fact you need to structure the data correctly, dealing with recursive components might be a nightmare depending on the requirements. Now think about displaying data within a tree and even making it reactive! It makes me tired just to think about it.

[Vue Tree](https://vue-treeselect.js.org/) crosses your path to make this task easier for you. 
This amazing component is capable of displaying tree structures easily and it also provides tons of functionalities such as built-in search, settings to determine whether all the nodes are selectable or only the leaves; it is also possible to load children nodes dynamically using AJAX. Well, there are endless possibilities here and you must try it.
One more thing to consider: its CSS classes are very well structured which means you can easily overwrite them to create your own custom style.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n40clc9u2msjvy461lc6.png)
_Source: [https://vue-treeselect.js.org/](https://vue-treeselect.js.org/)_ 

### Vue Tags Input
Within a web application context, it's very common to find tags input that acts like a multiple text field. 
In this case, it's not that difficult to implement your own component but why should you bother if there is already a third-party component that does the heavy work for you.
Meet [Vue Tags Input](http://www.vue-tags-input.com/#/).
It's a small package that provides a tags input ready to use.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fuvl66klbexszskkv29j.png)

_Source: [http://www.vue-tags-input.com/#/](http://www.vue-tags-input.com/#/)_

### Data Fetcher Component
Last but not least, let's talk about data fetching.
An application, regardless of being small or not, needs to fetch data from a server and display it to the user.
Now, imagine if you could build your own component that does that and even better, providing proper feedback to users, so that they know when data is still loading or if there is an error.

I'd like to introduce to you the [Data Fetcher Component](https://dev.to/vcpablo/vuejs-reusable-data-fetcher-component-1jdo). This is not exactly a third-party component because you will have to implement it yourself but this approach is very useful and reusable so, it's worth taking a look.
I've been using this component for a while and it really helps me.

---

It doesn't matter the size of your next VueJS application. The most important thing is that you are capable of finding resources, mechanisms, approaches and techniques that speed up your work.
All of the components, libraries and packages introduced to you here will help you with that and you will become free to focus on what really matters: developing!

I hope you liked it.
Please, comment and share!

_Cover Image by: [Matteo Grassi](https://unsplash.com/@matteo_grassi)_