Skip to content

Commit

Permalink
Loader component add
Browse files Browse the repository at this point in the history
  • Loading branch information
ramo-dev authored Apr 16, 2024
1 parent e460f31 commit b12a0e2
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 0 deletions.
124 changes: 124 additions & 0 deletions src/components/Loader/Loader.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
.pre-Loader {
position: absolute;
top: 50%;
left: 50%;
color: var(--primary-color);
scale: 1.3;
transform: translate(-50%, -50%);
background-color:var(--background-color);
z-index: 2;
overflow: hidden;
height: 100%;
padding: 5% 30% 0 50%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden !important;

/* transition: 5s ease-in-out; */
}
.pre-Loader-wrapper {
height: 100%;
width: 90%;
min-width: 150px;
height: 60px;
position: relative;
z-index: 1;
box-shadow: none !important;
}

.circle {
width: 20px;
height: 20px;
position: absolute;
border-radius: 50%;
background-color: var(--primary-color);
left: 15%;
transform-origin: 50%;
animation: circle7124 0.5s alternate infinite ease;
}

@keyframes circle7124 {
0% {
top: 60px;
height: 5px;
border-radius: 50px 50px 25px 25px;
transform: scaleX(1.7);
}

40% {
height: 20px;
border-radius: 50%;
transform: scaleX(1);
}

100% {
top: 0%;
}
}

.circle:nth-child(2) {
left: 45%;
animation-delay: 0.2s;
}

.circle:nth-child(3) {
left: auto;
right: 15%;
animation-delay: 0.3s;
}

.shadow {
width: 20px;
height: 4px;
border-radius: 50%;
background-color: rgba(0, 0, 0, 0.9);
position: absolute;
top: 62px;
transform-origin: 50%;
z-index: -1;
left: 15%;
filter: blur(1px);
animation: shadow046 0.5s alternate infinite ease;
}

@keyframes shadow046 {
0% {
transform: scaleX(1.5);
}

40% {
transform: scaleX(1);
opacity: 0.7;
}

100% {
transform: scaleX(0.2);
opacity: 0.4;
}
}

.shadow:nth-child(4) {
left: 45%;
animation-delay: 0.2s;
}

.shadow:nth-child(5) {
left: auto;
right: 15%;
animation-delay: 0.3s;
}

@media screen and (max-width: 800px) {
.pre-Loader-wrapper {
width: 100%;
min-width: 140px;

}
.pre-Loader {
left: 55%;
height: 100%;
overflow: hidden;
}
}
21 changes: 21 additions & 0 deletions src/components/Loader/Loader.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React, { useEffect } from 'react'
import './Loader.css'

const loader = () => {


return (
<div className="pre-Loader">
<div className="pre-Loader-wrapper">
<div className="circle"></div>
<div className="circle"></div>
<div className="circle"></div>
<div className="shadow"></div>
<div className="shadow"></div>
<div className="shadow"></div>
</div>
</div>
);
}

export default loader

0 comments on commit b12a0e2

Please sign in to comment.