Bootstrap 5 Crash Course Tutorial #13 - Bootstrap Icons
Key Takeaways
Uses Bootstrap Icons in a webpage
Full Transcript
okay then so sometime last year bootstrap released their own icon pack for using with bootstrap so that you no longer have to use font awesome or something like that you can just use bootstrap icons instead if you prefer now you can see all of the icons at icons.getbootstrap.com and currently they've got over 1 300 icons in the library and they're adding new ones all of the time so there's loads to choose from now you can search for icons right here for example i could type in clock and we could see all of the clock icons below now if we want to use one of these we can click on them and it's going to show us how to use the icon in our project now in all cases it's going to be this i tag that we use right here with a class of bi for bootstrap icons and then the icon name so let me just head back to install bootstrap icons if we click on this install link you can see we can either use npm or we can use a cdn now we're going to use the cdn to keep things simple for now and by the way bootstrap icons aren't just for bootstrap 5. you can use them in bootstrap 4 as well if you prefer they're separate from the core bootstrap package so i'm going to copy this link and then i'm going to add this to our code in our head and now we can use any of the icons in our page okay then so the first icon i want to add is an icon inside the nav bar to the left of the title and that is going to be a little book so let's go to bootstrap icons and scroll up to the top and then let's type book right here so i'm going to go with this one book half so we can click on it we can grab this code right here that's what we need to paste into our project and it's going to go just before this thing so let me paste it in right here and if i save that now we should be able to see the book at the top awesome simple okay so the next icons i'm going to add in are down here next to the book reviews so let me first of all go over here and i want to go back and this time i want to search for star so we're going to have this icon next to the title right here so let's grab that one copy that and go down to where this is defined this title if we scroll right down so book reviews right here and they're going to go inside the h2 with the text like so save it and we should be able to see that over here can we yep butt reviews awesome okay so finally i'm going to play some star ratings at the top of every review as well now in order to do that i'm going to come above the h5 and i'm going to create another div so that div is going to have a class of pb 2. so basically we're just giving this some padding to the bottom and it's strength too and inside here we're going to create a series of different icons now if we go to the icons i'm going to go back again we're going to use star so let me type in star again and it's going to be this one right here start fill let me grab that and let me paste five of these in because obviously this is going to be a five star book and if i save it now and preview over here we can see five stars awesome cool so now what i could do is grab that and i could paste it in each one so if i come down here above this h5 we'll paste it in and then down here above this h5 and then down here and then finally down here and because i want this to be authentic we'll change the last one to half so this is just four and a half out of five for this one review because that there was an icon as well if we take a look if we go back and say star up here it's this one star half okay cool so that is icons my friend and there's just one more thing i want to do and that is to scroll up here and this row right here i'm going to give a bit of margin because at the minute i feel like these list items are too near the title text so let me come to the row and say my hyphen five just to give it that extra margin and space around it and that looks a bit better
Original Description
Hey gang, in this bootstrap tutorial we'll take a look at the icon library and how to use icons in our web page.
🐱👤 View this course in full now - without ads - on Net Ninja Pro:
https://netninja.dev/p/bootstrap-5-crash-course
🐱💻 Access the course files on GitHub:
https://github.com/iamshaunjp/bootstrap-5-tutorial
🐱💻 HTML & CSS Crash Course:
https://www.youtube.com/watch?v=hu-q2zYwEYs&list=PL4cUxeGkcC9ivBf_eKCPIAYXWzLlPAm6G
🐱💻 Node.js Crash Course:
https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp
🐱💻 SASS Crash Course:
https://www.youtube.com/watch?v=St5B7hnMLjg&list=PL4cUxeGkcC9iEwigam3gTjU_7IA3W2WZA
🐱💻 VS Code - https://code.visualstudio.com/
🐱💻 Bootstrap 5 Docs - https://getbootstrap.com/docs/5.0/getting-started/download/
🐱💻 Social Links:
Facebook - https://www.facebook.com/thenetninjauk
Twitter - https://twitter.com/thenetninjauk
Instagram - https://www.instagram.com/thenetninja/
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Net Ninja · Net Ninja · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Net Ninja
Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Net Ninja
Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Net Ninja
GraphQL Tutorial #1 - Introduction to GraphQL
Net Ninja
GraphQL Tutorial #2 - A Birdseye View of GraphQL
Net Ninja
GraphQL Tutorial #3 - Project (stack) Overview
Net Ninja
GraphQL Tutorial #4 - Making Queries (front-end preview)
Net Ninja
GraphQL Tutorial #5 - Express App Setup
Net Ninja
GraphQL Tutorial #6 - Setting up GraphQL
Net Ninja
GraphQL Tutorial #7 - GraphQL Schema
Net Ninja
GraphQL Tutorial #8 - Root Query
Net Ninja
GraphQL Tutorial #9 - The Resolve Function
Net Ninja
GraphQL Tutorial #10 - Testing Queries in Graphiql
Net Ninja
GraphQL Tutorial #11 - GraphQL ID Type
Net Ninja
GraphQL Tutorial #12 - Author Type
Net Ninja
GraphQL Tutorial #13 - Type Relations
Net Ninja
GraphQL Tutorial #14 - GraphQL Lists
Net Ninja
GraphQL Tutorial #15 - More on Root Queries
Net Ninja
GraphQL Tutorial #16 - Connecting to mLab
Net Ninja
GraphQL Tutorial #17 - Mongoose Models
Net Ninja
GraphQL Tutorial #18 - Mutations
Net Ninja
GraphQL Tutorial #19 - More on Mutations
Net Ninja
GraphQL Tutorial #20 - Updating the Resolve Functions
Net Ninja
GraphQL Tutorial #21 - GraphQL NonNull
Net Ninja
GraphQL Tutorial #22 - Adding a Front-end
Net Ninja
GraphQL Tutorial #23 - Create React App
Net Ninja
GraphQL Tutorial #24 - Book List Component
Net Ninja
GraphQL Tutorial #25 - Apollo Client Setup
Net Ninja
GraphQL Tutorial #26 - Making Queries from React
Net Ninja
GraphQL Tutorial #27 - Rendering Data in a Component
Net Ninja
GraphQL Tutorial #28 - Add Book Component
Net Ninja
GraphQL Tutorial #29 - External Query File
Net Ninja
GraphQL Tutorial #30 - Updating Component State
Net Ninja
GraphQL Tutorial #31 - Composing Queries
Net Ninja
GraphQL Tutorial #32 - query variables
Net Ninja
GraphQL Tutorial #33 - Re-fetching Queries
Net Ninja
GraphQL Tutorial #34 - Book Details Component
Net Ninja
GraphQL Tutorial #36 - Styling the App
Net Ninja
GraphQL Tutorial #35 - Making a Single Query
Net Ninja
Build Apps with Vue & Firebase - Udemy Course
Net Ninja
Updated Vue & Firebase Course (Udemy)
Net Ninja
Vue & Firebase Real-time Chat (Preview) #1 - Intro
Net Ninja
Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Net Ninja
Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Net Ninja
Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Net Ninja
Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Net Ninja
Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Net Ninja
Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Net Ninja
Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Net Ninja
Object Oriented JavaScript Tutorial #1 - Introduction
Net Ninja
Object Oriented JavaScript Tutorial #2 - Object Literals
Net Ninja
Object Oriented JavaScript Tutorial #3 - Updating Properties
Net Ninja
Object Oriented JavaScript Tutorial #4 - Classes
Net Ninja
Object Oriented JavaScript Tutorial #5 - Class Constructors
Net Ninja
Object Oriented JavaScript Tutorial #6 - Class Methods
Net Ninja
Object Oriented JavaScript Tutorial #7 - Method Chaining
Net Ninja
Object Oriented JavaScript Tutorial #8 - Class Inheritance
Net Ninja
Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Net Ninja
Object Oriented JavaScript Tutorial #10 - Prototype
Net Ninja
Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Net Ninja
More on: HTML & CSS
View skill →Related Reads
📰
📰
📰
📰
Why I Built Yet Another JavaScript Date Picker
Dev.to · RollDate
Building a Browser-Based Tiled Poster PDF Generator
Dev.to · Gaven
3 Next.js Micro-Interactions to Make Your App Feel Premium
Dev.to · jackke88
Test your vanilla JS app in the real browser, with no build step
Dev.to · Kevin Julián Martínez Escobar
🎓
Tutor Explanation
DeepCamp AI