Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Missing Bootstrap 5 Guide

You're reading from   The Missing Bootstrap 5 Guide Customize and extend Bootstrap 5 with Sass and JavaScript to create unique website designs

Arrow left icon
Product type Paperback
Published in Aug 2022
Publisher Packt
ISBN-13 9781801076432
Length 384 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jeppe Schaumburg Jensen Jeppe Schaumburg Jensen
Author Profile Icon Jeppe Schaumburg Jensen
Jeppe Schaumburg Jensen
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part One – Customizing Bootstrap 5 with Sass
2. Chapter 1: Why and How to Customize Bootstrap FREE CHAPTER 3. Chapter 2: Using and Compiling Sass 4. Chapter 3: Downloading and Exploring the Bootstrap 5 Sass Files 5. Chapter 4: Bootstrap 5 Global Options and Colors 6. Chapter 5: Customizing Various Bootstrap 5 Elements 7. Chapter 6: Understanding and Using the Bootstrap 5 Utility API 8. Part Two – Creating a Unique-Looking Website Based on Bootstrap 5 and Customization
9. Chapter 7: Creating the Website Using Default Bootstrap 5 Elements 10. Chapter 8: Customizing the Website Using Bootstrap 5 Variables, Utility API, and Sass 11. Chapter 9: Improving the Website with Interactive Features Using JavaScript 12. Part Three – Advanced Topics Related to Bootstrap 5
13. Chapter 10: Using Bootstrap 5 with Advanced Sass and CSS Features 14. Chapter 11: Using Bootstrap 5 with Advanced JavaScript Features 15. Chapter 12: Optimizing Bootstrap 5 CSS and JavaScript Code 16. Other Books You May Enjoy

Examples of user interfaces with a customized version of Bootstrap 5

In this section, we will see four examples of user interfaces using a customized version of Bootstrap 5. For each example, we will first see a screenshot of the user interface using the default Bootstrap 5 styles and then a screenshot of the user interface using a customized version of Bootstrap 5. This will then be followed by a list of what has been customized. We will start with a simple example of one UI element, where we can better see the actual changes, and then have a look at three different full-page examples. All screenshots, as well as the complete customized examples, can be found in the accompanying code for this book in the following folder: part-1/chapter-1/example-user-interfaces/. I recommend that you look at those while going through these examples and the lists of what has been customized to have a better understanding of the actual changes.

The card component

The following is the first example, which is a Bootstrap 5 card component. Inside of the component, we’re using the nav and list group components as well:

Figure 1.3 – The card component using the default Bootstrap 5 styles

Figure 1.3 – The card component using the default Bootstrap 5 styles

Figure 1.4 – The card component using a customized version of Bootstrap 5

Figure 1.4 – The card component using a customized version of Bootstrap 5

In this example, the following Bootstrap 5 customizations have been made:

  • Changed the global settings for the primary color, base font size, headings, and font weight
  • Changed the color, background color, font size, padding, margin, border width, and border radius for the card component
  • Changed the padding for the nav component
  • Changed the color, background color, and padding for the list group component

Forum

The following is the second example, which is a common forum UI taken from an online forum template. It’s created with the use of tables and various Bootstrap 5 components, including buttons, a breadcrumb, badges, dropdowns, and pagination.

Figure 1.5 – A forum UI using the default Bootstrap 5 styles

Figure 1.5 – A forum UI using the default Bootstrap 5 styles

Figure 1.6 – A forum UI using a customized version of Bootstrap 5

Figure 1.6 – A forum UI using a customized version of Bootstrap 5

In this example, the following Bootstrap 5 customizations have been made:

  • Changed global settings for primary, info, and body background colors
  • Removed the underline from links
  • Removed all border radiuses
  • Changed the background color of input elements
  • Changed the color, padding, and borders of tables
  • Changed the horizontal padding for buttons
  • Changed the horizontal padding for paginations
  • Changed the padding for and added text-transform to badges

The contact page

The following is the third example, which is a contact page taken from a Small Business Website template. It features various Bootstrap 5 form elements, including input groups, text inputs, dropdowns, textarea, and buttons. It also uses the ratio helper class to embed a Google Maps map with the right aspect ratio.

Figure 1.7 – The contact page UI using the default Bootstrap 5 styles

Figure 1.7 – The contact page UI using the default Bootstrap 5 styles

Figure 1.8 – The contact page UI using a customized version of Bootstrap 5

Figure 1.8 – The contact page UI using a customized version of Bootstrap 5

In this example, the following Bootstrap 5 customizations have been made:

  • Changed global settings for primary and body text colors
  • Removed the border radius on buttons, dropdowns, select elements, and input elements
  • Changed the color for input group addons
  • Changed the “4x3” ratio helper to “3x2”
  • Changed the font weight and margin for headings

Portfolio

The following is the fourth and final example, which is a portfolio item page taken from a Portfolio template. It features a carousel, image thumbnails, and various kinds of typography.

Figure 1.9 – A portfolio item UI using the default Bootstrap 5 styles

Figure 1.9 – A portfolio item UI using the default Bootstrap 5 styles

Figure 1.10 – A portfolio item UI using a customized version of Bootstrap 5

Figure 1.10 – A portfolio item UI using a customized version of Bootstrap 5

In this example, the following Bootstrap 5 customizations have been made:

  • Changed global settings for primary and light colors
  • Generated a darker variant of the primary color using a Bootstrap 5 color function
  • Disabled the border radius on all elements using the global option
  • Increased the container maximum width for the xxl breakpoint
  • Decreased the grid gutter width
  • Changed the colors of headings and muted text
  • Changed the font size used for small text
  • Changed the color and font size of the navbar
  • Changed the indicators of the carousel
  • Changed the image thumbnail borders
  • Changed the color and font size of the figure caption

Further customizations in this book

The four preceding examples only showed the visual impact of different customizations and a brief description of the changes. In Chapter 3, Downloading and Exploring the Bootstrap 5 Sass Files, we will learn about the code needed to make similar changes. Later, in Part 2 of this book, we will create a fully customized example of a complete website project.

You have been reading a chapter from
The Missing Bootstrap 5 Guide
Published in: Aug 2022
Publisher: Packt
ISBN-13: 9781801076432
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime