Materialize Tutorial #8 - Icons

Net Ninja · Beginner ·🛠️ AI Tools & Apps ·8y ago

Key Takeaways

Uses Materialize to implement icons in a project

Full Transcript

alright the gang so if you remember way back to lesson two when we set up this file initially what we did at the top is grab the Google icon font library and we placed it right there and now we're gonna make use of this library and start playing around with icons a little bit but how do we use these icons well pretty simply whenever we want to use an icon what we do is create an iTouch like this it's just an eye and then give it a class off material - icons then we can choose from loads of different icons and I'm going to show you how many icons there are in fact I've gone to the material design icons right here I'll leave the link down below so you can take a look at this and there are absolutely tons of different icons that we can use now the way we output a specific icon is by using these different key words here salts or send or redo or save so we use that keyword inside the eye tag we give it a class of material icons and then we say which icon we actually want to use inside the eye tag itself so for example if I won't want called an error then I can do that save it and if I view this in a browser now we can see this error icon right here right and we can also change the color of these at the end of the day this is a text right into fonts so if we're changing this we don't change the background color we change the text color so I could say since it's an error red - text and if I save that and view this we can see that this is now a red which is pretty cool I'm going to zoom in so you can see these a bit better all right so what other different icons can we use well there's loads but let's just do a few different examples first of all we'll say material icons right here we need that for every icon that we do then inside we'll say warning and since this is a warning I think what I'll do is make this yellow text so we'll say yellow - text and then I also want to say text - darken - - just too dark and that yellow a little bit as well let's have a look at this okay so now we get that warning triangle right there and it's yellow cool alright so what else should we do well we'll say material icons again and then this time I want it to be a cloud so let's do that and we'll make this great I think so we'll do gray - text and we need this thing right here because I've missed it off save that and preview this and now we get a great cloud finally what I'd like to do is some kind of folder source a material icons will make this Ballou and then the key word for this is folder so if we save this now and if you in a browser we can see this blue background folder because I've said blue and not blue text that's what happens when you give it a background color this is the blue text color so now we get a blue folder itself all right awesome so I said that we can use icons inside buttons and that's pretty common in web designs right sometimes you've got a button that says send with a little paper airplane on it or something like that so let's do something along those lines so I'm gonna scroll down here to where it says icons on buttons and we have anchor text right here so first of all I'm gonna make these buttons by saying BTN and I'm gonna give this a color of indigo that's a background color remember and now what I want to do is add text and also an icon inside this so what I'm gonna do is use a span tag for the text you don't need to use a span tag for the text but I like to put my text inside here just in case I want to target it in my own CSS separately I can do that using the spun tag and I'm gonna say send and then underneath that what I'm gonna do is an eye tag for a material icon and then we'll give this a class equal to material - icons and the key word for this one is going to be send so if I save that now I view this over here now it's not quite working and that's probably because there we go we've missed out an S from class so save that now and view it and now we can see this thing right here but it's not really aligned correctly it looks a bit higher than it should be of this lower than it should be so what we'll do is over here if we're using this on a button you can either say left to have the icon on the left of the button or right to float it right and if we do that then it should align a bit better now we can see in the middle that's pretty awesome okay then let's do another down here I'm gonna give this anchor tag a class of BTN I'm going to call it this pink and it's gonna have the waves effect and we'll say waves - white so we've seen all that before then the text I want this to have is going to be email so we'll make a span tag and say email inside then underneath that we'll do an attack with material icons as the class and then inside here we want to output the email icon we also want this to go to the right as well so we'll say write and save that view in a browser and now we can see an email button now what if we say left let's just change that to left and now we should see this on the left awesome so that's how we can add these icons onto buttons very easily and they look pretty cool if I'm honest now I'd like to show you those floating buttons and we touched on these in the last video there were the circular buttons and we could add icons to those as well now typically we use those icons for things like edit or add or delete you know the little controls where we're adding data or deleting data that kind of stuff so let's create those first of all we'll create the button which is a floating button by saying BTN floating then I want to make this blue and I want to make it pulse as well okay so inside here what do we want to do well all we really want to do is an icon we don't want text just an icon so we can say I got material - icons and then the first one is going to be at and that's going to give us a little plus button so if I save this now view this in a browser we can see this blue pulsating + port and that's pretty cool now let's do another one will say BTN - floating and then it will make this red and also pulse and then this one is going to be for removing an item so we'll say I don't material icons and then inside this will say remove so let's save that and we should get a little minus sign now cool that's awesome and then finally it will do one for editing so we'll say BTN - floating again then we'll make this orange and also pulse and then inside we want our icon so I dot material - icons again and then this is going to be edit save that and view in a browser and we see this little pencil to edit the item as well so all of this stuff with buttons and icons in my opinion is one of the best things about material I CSS because we can very easily make these awesome looking UI components

Original Description

Hey gang, in this Materialize tutorial we'll take a look at material icons and how we can use them in our projects. All icons - https://material.io/tools/icons/?style=baseline ---------------------------------------- 🐱‍💻 Course Links: + VS Code editor - https://code.visualstudio.com/ + GitHub repository (course files) - https://github.com/iamshaunjp/materialize-playlist +Materialize docs - https://materializecss.com/getting-started.html ---------------------------------------- 🤑 Donate @ https://www.paypal.me/thenetninja 🎓Find me on Udemy @ https://www.udemy.com/user/47fd83f6-5e4a-4e87-a0f0-519ac51f91b6/
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 Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Regular Expressions (RegEx) Tutorial #14 - Matching a Username
Net Ninja
2 Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
Net Ninja
3 Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Regular Expressions (RegEx) Tutorial #16 - Finishing Touches
Net Ninja
4 GraphQL Tutorial #1 - Introduction to GraphQL
GraphQL Tutorial #1 - Introduction to GraphQL
Net Ninja
5 GraphQL Tutorial #2 - A Birdseye View of GraphQL
GraphQL Tutorial #2 - A Birdseye View of GraphQL
Net Ninja
6 GraphQL Tutorial #3 - Project (stack) Overview
GraphQL Tutorial #3 - Project (stack) Overview
Net Ninja
7 GraphQL Tutorial #4 - Making Queries (front-end preview)
GraphQL Tutorial #4 - Making Queries (front-end preview)
Net Ninja
8 GraphQL Tutorial #5 - Express App Setup
GraphQL Tutorial #5 - Express App Setup
Net Ninja
9 GraphQL Tutorial #6 - Setting up GraphQL
GraphQL Tutorial #6 - Setting up GraphQL
Net Ninja
10 GraphQL Tutorial #7 - GraphQL Schema
GraphQL Tutorial #7 - GraphQL Schema
Net Ninja
11 GraphQL Tutorial #8 - Root Query
GraphQL Tutorial #8 - Root Query
Net Ninja
12 GraphQL Tutorial #9 - The Resolve Function
GraphQL Tutorial #9 - The Resolve Function
Net Ninja
13 GraphQL Tutorial #10 - Testing Queries in Graphiql
GraphQL Tutorial #10 - Testing Queries in Graphiql
Net Ninja
14 GraphQL Tutorial #11 - GraphQL ID Type
GraphQL Tutorial #11 - GraphQL ID Type
Net Ninja
15 GraphQL Tutorial #12 - Author Type
GraphQL Tutorial #12 - Author Type
Net Ninja
16 GraphQL Tutorial #13 - Type Relations
GraphQL Tutorial #13 - Type Relations
Net Ninja
17 GraphQL Tutorial #14 - GraphQL Lists
GraphQL Tutorial #14 - GraphQL Lists
Net Ninja
18 GraphQL Tutorial #15 - More on Root Queries
GraphQL Tutorial #15 - More on Root Queries
Net Ninja
19 GraphQL Tutorial #16 - Connecting to mLab
GraphQL Tutorial #16 - Connecting to mLab
Net Ninja
20 GraphQL Tutorial #17 - Mongoose Models
GraphQL Tutorial #17 - Mongoose Models
Net Ninja
21 GraphQL Tutorial #18 - Mutations
GraphQL Tutorial #18 - Mutations
Net Ninja
22 GraphQL Tutorial #19 - More on Mutations
GraphQL Tutorial #19 - More on Mutations
Net Ninja
23 GraphQL Tutorial #20 - Updating the Resolve Functions
GraphQL Tutorial #20 - Updating the Resolve Functions
Net Ninja
24 GraphQL Tutorial #21 - GraphQL NonNull
GraphQL Tutorial #21 - GraphQL NonNull
Net Ninja
25 GraphQL Tutorial #22 - Adding a Front-end
GraphQL Tutorial #22 - Adding a Front-end
Net Ninja
26 GraphQL Tutorial #23 - Create React App
GraphQL Tutorial #23 - Create React App
Net Ninja
27 GraphQL Tutorial #24 - Book List Component
GraphQL Tutorial #24 - Book List Component
Net Ninja
28 GraphQL Tutorial #25 - Apollo Client Setup
GraphQL Tutorial #25 - Apollo Client Setup
Net Ninja
29 GraphQL Tutorial #26 - Making Queries from React
GraphQL Tutorial #26 - Making Queries from React
Net Ninja
30 GraphQL Tutorial #27 - Rendering Data in a Component
GraphQL Tutorial #27 - Rendering Data in a Component
Net Ninja
31 GraphQL Tutorial #28 - Add Book Component
GraphQL Tutorial #28 - Add Book Component
Net Ninja
32 GraphQL Tutorial #29 - External Query File
GraphQL Tutorial #29 - External Query File
Net Ninja
33 GraphQL Tutorial #30 - Updating Component State
GraphQL Tutorial #30 - Updating Component State
Net Ninja
34 GraphQL Tutorial #31 - Composing Queries
GraphQL Tutorial #31 - Composing Queries
Net Ninja
35 GraphQL Tutorial #32 - query variables
GraphQL Tutorial #32 - query variables
Net Ninja
36 GraphQL Tutorial #33 - Re-fetching Queries
GraphQL Tutorial #33 - Re-fetching Queries
Net Ninja
37 GraphQL Tutorial #34 - Book Details Component
GraphQL Tutorial #34 - Book Details Component
Net Ninja
38 GraphQL Tutorial #36 - Styling the App
GraphQL Tutorial #36 - Styling the App
Net Ninja
39 GraphQL Tutorial #35 - Making a Single Query
GraphQL Tutorial #35 - Making a Single Query
Net Ninja
40 Build Apps with Vue & Firebase - Udemy Course
Build Apps with Vue & Firebase - Udemy Course
Net Ninja
41 Updated Vue & Firebase Course (Udemy)
Updated Vue & Firebase Course (Udemy)
Net Ninja
42 Vue & Firebase Real-time Chat (Preview) #1 - Intro
Vue & Firebase Real-time Chat (Preview) #1 - Intro
Net Ninja
43 Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Vue & Firebase Real-time Chat (Preview) #2 - Project Structure
Net Ninja
44 Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Vue & Firebase Real-time Chat (Preview) #3 - Firestore Setup
Net Ninja
45 Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Vue & Firebase Real-time Chat (Preview) #4 - Welcome Screen
Net Ninja
46 Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Vue & Firebase Real-time Chat (Preview) #5 - Props in Routes
Net Ninja
47 Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Vue & Firebase Real-time Chat (Preview) #6 - Route Guards
Net Ninja
48 Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Vue & Firebase Real-time Chat (Preview) #7 - Chat Window
Net Ninja
49 Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Vue & Firebase Real-time Chat (Preview) #8 - New Message Component
Net Ninja
50 Object Oriented JavaScript Tutorial #1 - Introduction
Object Oriented JavaScript Tutorial #1 - Introduction
Net Ninja
51 Object Oriented JavaScript Tutorial #2 - Object Literals
Object Oriented JavaScript Tutorial #2 - Object Literals
Net Ninja
52 Object Oriented JavaScript Tutorial #3 - Updating Properties
Object Oriented JavaScript Tutorial #3 - Updating Properties
Net Ninja
53 Object Oriented JavaScript Tutorial #4 - Classes
Object Oriented JavaScript Tutorial #4 - Classes
Net Ninja
54 Object Oriented JavaScript Tutorial #5  - Class Constructors
Object Oriented JavaScript Tutorial #5 - Class Constructors
Net Ninja
55 Object Oriented JavaScript Tutorial #6 - Class Methods
Object Oriented JavaScript Tutorial #6 - Class Methods
Net Ninja
56 Object Oriented JavaScript Tutorial #7 - Method Chaining
Object Oriented JavaScript Tutorial #7 - Method Chaining
Net Ninja
57 Object Oriented JavaScript Tutorial #8 - Class Inheritance
Object Oriented JavaScript Tutorial #8 - Class Inheritance
Net Ninja
58 Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Object Oriented JavaScript Tutorial #9 - Constructors (under the hood)
Net Ninja
59 Object Oriented JavaScript Tutorial #10 - Prototype
Object Oriented JavaScript Tutorial #10 - Prototype
Net Ninja
60 Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Object Oriented JavaScript Tutorial #11 - Prototype Inheritance
Net Ninja

Related AI Lessons

How to Create a Second Version of Yourself Inside Obsidian Using AI (Step-by-Step Guide)
Learn to create a second version of yourself inside Obsidian using AI with a step-by-step guide
Medium · ChatGPT
How to prepare for Spain civil service TIC exam using AI in 2026
Learn how to prepare for the Spain civil service TIC exam using AI in 2026, boosting your chances of success with technology-driven study techniques
Dev.to · David García
Going Viral! How I Created AI Kissing Videos Step by Step Easily Using AIAI.com
Create viral AI kissing videos using AIAI.com in a step-by-step process, leveraging AI technology for creative content creation
Medium · AI
How to prepare TIC teacher exams in Spain with AI (oposiciones 2026)
Prepare for TIC teacher exams in Spain using AI with these actionable steps
Dev.to AI
Up next
Low-Tech, High-Impact: Replacing Your Receptionist With a $15 AI Phone System
Maximum Lawyer
Watch →