Book Image

Bootstrap 4 Cookbook

By : Ajdin Imsirovic
Book Image

Bootstrap 4 Cookbook

By: Ajdin Imsirovic

Overview of this book

Bootstrap, one of the most popular front-end frameworks, is perfectly built to design elegant, powerful, and responsive interfaces for professional-level web pages. It supports responsive design by dynamically adjusting your web page layout. Bootstrap 4 is a major update with many impressive changes that greatly enhance the end results produced by Bootstrap. This cookbook is a collection of great recipes that show you how to use all the latest features of Bootstrap to build compelling UIs. This book is using the most up-to-date version of Bootstrap 4 in all its chapters. First off, you will be shown how you can leverage the latest core features of Bootstrap 4 to create stunning web pages and responsive media. You will gradually move on to extending Bootstrap 4 with the help of plugins to build highly customized and powerful UIs. By the end of this book, you will know how to leverage, extend, and integrate bootstrap to achieve optimal results for your web projects.
Table of Contents (19 chapters)
Title Page
About the Author
About the Reviewer
Customer Feedback

Customizing select boxes with Select2 plugin

In this recipe, we will look into another excellent plugin for customizing select boxes, available at The repository can be found at

Getting ready

In this recipe, we will implement Select2 plugin's version of multiple select boxes. That way, we can easily compare the look and feel of this plugin's features with the Bootstrap Select plugin that we covered in the previous chapter.

To get ready, navigate to and test the functionality in the example.

How to do it…

  1. In app/_layout.ejs, reference the CSS file from CDNJS:
<link href="" rel="stylesheet" />
  1. In app/partials/_js.ejs, call the JS file from CDNJS:
<script src=""></script>
  1. Copy the following code and paste it into app/recipe06-05...