The Frontend Hitchhiker's Guide: UI Libraries
Tags: webdev, hitchhikers, javascript, codenewbie
Published: 2021-05-29 03:10:54

# About the hitchhikers series

This is a series of posts dedicated to help devs discover and navigate the web ecosystem. Look, web development is vast and intimidating everyone could use a guide.


# User Interface Libraries

UI libraries are third party code that traditionally provide UI components and utility classes used by developers to create apps. Classes that affect styling & layout and resuable UI components are typically provided the library. More modern libraries may also provide syntax for creating stateful components.

The following are some popular libraries.
1. [Tailwind CSS](#tailwind-css)
2. [Bootstrap CSS](#bootstrap)
3. [Materialize CSS](#materialize-css)
4. [jQuery](#jquery)
5. [Reactjs](#reactjs)
6. [Vuejs](#vuejs)

# Tailwind CSS
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wghytwhjryvhlsy5y4e0.png)
 
These days it feels like this wouldn't be a Dev.to post without mentioning [tailwind](https://tailwindcss.com/). It's a highly popular library for good reason. There's so many utility classes you can tweak the smallest details of you app needing to write any CSS.

# Bootstrap
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p1kgzwhylmrz3xxwm6wo.png)
 
Another popular library that is usually the first for many devs is [Bootstrap](https://getbootstrap.com/). It's not as flexible as tailwind but its easy to use and has tons of themes, and examples.

# Materialize CSS
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqos2k4pegzqsv700xh7.png)
 
This is my personal pick for putting together a web app quickly. [Materialize CSS](https://materializecss.com/) is great for making an app that follows the material design specification.

# jQuery
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2jvef2vnalxws079g0c6.png)
 
This legacy library is more of an honourable mention. Around 2017-2019 it was unfathomable to build a website without [jQuery](https://jquery.com/). It provided easy to use APIs for cross browser DOM manipulation, AJAX and attaching event handlers. 

Since then the standardization of APIs such as document.querySelector() and fetch() have somewhat replaced the common use cases for the library. 

However, jQuery is still used today and has spawned other projects like [jQuery UI](https://jqueryui.com/) and [Quint](https://qunitjs.com/).

# React JS
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hn48yyzfauuejgy9gly2.png)
You are probably wondering why this wasn't at the top. According to the [State of JS survey](https://2020.stateofjs.com/en-US/technologies/front-end-frameworks/), [ReactJS](https://reactjs.org/) has been the most used 'Front-end Framework' since 2016. React is featured 5th in this post because it is both a library and a framework.
 
React allows for a gradual adoption where you can [use it as a drop in library] (https://raw.githubusercontent.com/reactjs/reactjs.org/master/static/html/single-file-example.html). However, it is recommended to be used more like a framework by utilizing the CLI tool for bootstrapping and compiling a project. 

React is also different from the aforementioned options as it allows you to create reusable components that have state. For example you can create a new element with a custom tag such as `<counter></counter>`. 

Counter is made up of a two buttons and a number input field such that the buttons change the field's value. The counter element can be reused multiple times and each counter's value can be easily accessed and reassigned. Instead of providing UI components, react allows you to create your own.

In my opinion React's documentation is easy to follow and the basics can be picked up fairly quickly. React also boasts a declarative coding style that allows you to write more predictable code that is easier to debug.

# Vue JS

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

[Vue](https://vuejs.org/) feels is like the de facto react alternative. It argues some performance improvement over react and doesn't require you to write JSX or CSS in JavaScript. 

Vue is the third most popular 'Front-end Framework' behind Angular and then React (State of JS Survey). Unlike the other frameworks, Vue was not created within a big tech company like Facebook (react) or Google (angular). It is impressive to see how far the Vue ecosystem has come from just a community backing.

# Conclusion
That concludes our visit to our first destination on this journey. There's 7 more stops to go! If you found this informational please consider following me on [dev.to](https://dev.to/snickdx) or on [twitter](https://twitter.com/snickdx) so you won't miss the next post in this series. 

What is your favourite UI Library and why?

# References
* [State of JS](https://2020.stateofjs.com/en-US/technologies/front-end-frameworks/)
* [Vuejs Comparison with Other Frameworks](https://dev.to/snickdx/the-frontend-hitchhiker-s-guide-ui-libraries-2jje-temp-slug-4600245/edit)