Check out example codes for "how to add loader in html". It will help you in understanding the concepts better.

Code Example 1

.loader {
  border-top: 16px solid blue;
  border-right: 16px 
solid green;
  border-bottom: 16px solid red;
  border-left: 
16px solid pink;
}

Code Example 2

.loader {
  border: 16px solid #f3f3f3; /* Light grey */
  
border-top: 16px solid #3498db; /* Blue */
  border-radius: 50%;
  
width: 120px;
  height: 120px;
  animation: 
spin 2s linear infinite;
}

@keyframes spin {
  
0% { transform: rotate(0deg); }
  100% { transform: 
rotate(360deg); }
}

Code Example 3

.loader {
  border-top: 16px solid blue;
  border-bottom: 16px solid blue;
}

Code Example 4

.loader {
  border-top: 16px solid blue;
  border-right: 
16px solid green;
  border-bottom: 16px solid red;
}

Learn ReactJs, React Native from akashmittal.com