Material Symbols Lock Icon
The Material Symbols Lock Icon is given below. You can copy and paste this HTML symbols code in the same way in your project. First, make sure you have added the Google Fonts Lock Material Symbols library. If this library is added just add the HTML CSS lock any element to add the icon. Material Symbols Lock Icon can be resized as per your need. You can manage the size of the icon(Lock) by using font-size CSS style.
You can get steps to add HTML Lock Web, React, Vuetify, Material UI, Material Symbols, and Angular Material framework.
How to add Material Symbols Lock Icon ?
You can integrate material Lock symbols in web pages by just copy paste the following syntax & icon code.
1. Web
You can integrate Icon in web pages by just adding following below syntax & icon code.
<span class="material-symbols-outlined">lock</span>
lock
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<span class="material-symbols-outlined"> lock </span>
<span class="material-symbols-outlined"> lock </span>
2. Material Lock Symbol Font CSS Examples
Use CSS fonts to set a different axis. See examples below.
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,
GRAD@20..48,100..700,0..1,-50..200" />
<!-- everything default and using `different font-size:28px ,32px , 36px, 40px` -->
<span class="material-symbols-outlined">lock</span>
<span class="material-symbols-outlined" style="font-size:28px;color:blue">lock</span>
<span class="material-symbols-outlined" style="font-size:32px;color:green">lock</span>
<span class="material-symbols-outlined" style="font-size:36px;color:teal">lock</span>
<span class="material-symbols-outlined" style="font-size:40px;color:red">lock</span>
Change Material Lock Symbol Icon Font Variation Settings
Sometimes we need Lock symbols in different font variations settings. In order to do so, we have to use the CSS style of Font variations Settings. Check the example of Font Variations Settings of Material Lock Symbols with CSS style below.
<!-- Using `different type of Fill, Weight, Grad, Opsz -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,
GRAD@20..48,100..700,0..1,-50..200"/>
<span class="material-symbols-outlined" style="font-variation-settings:'FILL'1";>lock</span>
<span class="material-symbols-outlined" style="font-variation-settings:'wght'300">lock</span>
<span class="material-symbols-outlined" style="font-variation-settings:'GRAD'100">lock</span>
<span class="material-symbols-outlined" style="font-variation-settings:'opsz'10">lock</span>
Lock Symbols Thin Outlined and Thick filled icons
The fill provides the ability to change the default Material Font Lock symbols PNG & SVG style. A symbol can represent both filled and unfilled. Use a full animation or interactive form to explain the changes in the environment. Values are 0 by default or 1 for fully filled. Along with the weight axis, fill affects the size of the symbol.
<!-- loads the entire Variable Font -->
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,
GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet" />
<!-- thin outlined icons -->
<div style="font-variation-settings: 'FILL' 0, 'wght' 100, 'GRAD' 0, 'opsz' 48;">
<span class="material-symbols-outlined">lock</span>
<span class="material-symbols-outlined" style="font-size:32px;color:red">lock</span>
<span class="material-symbols-outlined" style="font-size:36px;color:green">lock</span>
<span class="material-symbols-outlined" style="font-size:40px;color:blue">lock</span>
</div>
<!-- thick filled icons -->
<div style="font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 48;">
<span class="material-symbols-outlined">lock</span>
<span class="material-symbols-outlined" style="font-size:32px;color:red">lock</span>
<span class="material-symbols-outlined" style="font-size:36px;color:green">lock</span>
<span class="material-symbols-outlined" style="font-size:40px;color:blue">lock</span>
</div>
Animation in material Lock Symbol
If you use CSS Lock symbols or want more control over symbol properties, use the Google Symbol variable font. All variable fonts in digital format can be padded with spaces Can I use variable font support to control whether users can specify variable fonts? Here are some examples of Lock Symbols Animations.
<!-- loads the entire Variable Font -->
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,
0..1,-50..200" rel="stylesheet" />
<style>
.pulse {animation: pulse 3s infinite;}
@keyframes pulse {
0% { font-variation-settings: 'wght' 100;}
50% { font-variation-settings: 'wght' 700;}
100% { font-variation-settings: 'wght' 100;}
}
</style>
<div class="pulse">
<span class="material-symbols-outlined">lock</span>
<span class="material-symbols-outlined" style="font-size:32px;color:red">lock</span>
<span class="material-symbols-outlined" style="font-size:36px;color:green">lock</span>
<span class="material-symbols-outlined" style="font-size:40px;color:blue">lock</span>
</div>
Styling of Google Material Lock Symbols
These Lock symbols are designed according to the Material Design guidelines and will look good if you use the recommended icons. size and color The layout below makes it easy to use sizes, colors, and work types.
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet"/>
<style>
/* Recommended icon sizes */
span.size-20 {font-size: 20px;font-variation-settings: 'OPSZ' 20;}
span.size-24 {font-size: 24px;font-variation-settings: 'OPSZ' 24;}
span.size-40 {font-size: 40px;font-variation-settings: 'OPSZ' 40;}
span.size-48 {font-size: 48px;font-variation-settings: 'OPSZ' 48;}
/* Rules for using icons as black on a light background. */
.dark {background: black;color: rgba(255, 255, 255, 1);font-variation-settings: 'GRAD' -25;}
.dark-inactive {background: black;color: rgba(255, 255, 255, 0.3);font-variation-settings: 'GRAD' -25;}
</style>
<div>
<span class="material-symbols-outlined size-20">lock</span>
<span class="material-symbols-outlined size-24">lock</span>
<span class="material-symbols-outlined size-40">lock</span>
<span class="material-symbols-outlined size-48">lock</span>
</div>
<div>
<span class="material-symbols-outlined dark">lock</span>
<span class="material-symbols-outlined dark-inactive">lock</span>
</div>
Tags
lock,locked,password,privacy,private,protection,safety,secure,security
lock
lock
lock
lock
Material Symbols Lock Icon | lock | HTML, CSS
Adding Material Symbols icon HTML Lock(lock) in web project is very simple. You need to add the icon class along with material-symbols-outlined, it is basically main class and mandatory for icons so do not forget to add this class. You can customize Material Symbols Lock Icon Lock as per your requirement, suppose that you need to chnage the color of Lock icon or change the size of size. It is pretty simple to change color of icon Lock just add style="color:red" it will make font color red. On the same way you can change size of Lock icon by just adding style="font-size:50px;". Smililarly you can add border color, shadow and other font styles to Lock. Hope this icon fullfilled your need. Thanks for visiting us.
Change Material Symbols Icon Lock Color
Sometimes we need icons in different color, as we suggested by adding css style we can change color. Here we have created one example to change color of icons with css classes.
<style>
.blue-color {
color:blue;
}
.green-color {
color:green;
}
.teal-color {
color:teal;
}
.yellow-color {
color:yellow;
}
.red-color {
color:red;
}
</style>
<span class="material-symbols-outlined blue-color"> lock</span>
<span class="material-symbols-outlined green-color">lock </span>
<span class="material-symbols-outlined teal-color"> lock</span>
<span class="material-symbols-outlined yellow-color">lock </span>
<span class="material-symbols-outlined red-color">lock </span>
Output of the above example will be as below- lock lock lock lock lock
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
Advertisements
Related Icons
Advertisements