Retour

Prévisualisation

HTML
<div class="wfl-wifi-loader">
  <svg class="wfl-circle-outer" viewBox="0 0 86 86">
    <circle class="wfl-back" cx="43" cy="43" r="40"></circle>
    <circle class="wfl-front" cx="43" cy="43" r="40"></circle>
  </svg>
  <svg class="wfl-circle-middle" viewBox="0 0 60 60">
    <circle class="wfl-back" cx="30" cy="30" r="27"></circle>
    <circle class="wfl-front" cx="30" cy="30" r="27"></circle>
  </svg>
  <svg class="wfl-circle-inner" viewBox="0 0 34 34">
    <circle class="wfl-back" cx="17" cy="17" r="14"></circle>
    <circle class="wfl-front" cx="17" cy="17" r="14"></circle>
  </svg>
  <div class="wfl-text" data-text="Searching"></div>
</div>
CSS
.wfl-wifi-loader {
  --background: #62abff;
  --front-color: #4f29f0;
  --back-color: #c3c8de;
  --text-color: #414856;
  width: 64px;
  height: 64px;
  border-radius: 50px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wfl-wifi-loader svg {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wfl-wifi-loader svg circle {
  position: absolute;
  fill: none;
  stroke-width: 6px;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-100deg);
  transform-origin: center;
}

.wfl-wifi-loader svg circle.wfl-back { stroke: var(--back-color); }
.wfl-wifi-loader svg circle.wfl-front { stroke: var(--front-color); }

.wfl-wifi-loader svg.wfl-circle-outer {
  height: 86px;
  width: 86px;
}

.wfl-wifi-loader svg.wfl-circle-outer circle { stroke-dasharray: 62.75 188.25; }
.wfl-wifi-loader svg.wfl-circle-outer circle.wfl-back { animation: wfl-circle-outer 1.8s ease infinite 0.3s; }
.wfl-wifi-loader svg.wfl-circle-outer circle.wfl-front { animation: wfl-circle-outer 1.8s ease infinite 0.15s; }

.wfl-wifi-loader svg.wfl-circle-middle {
  height: 60px;
  width: 60px;
}

.wfl-wifi-loader svg.wfl-circle-middle circle { stroke-dasharray: 42.5 127.5; }
.wfl-wifi-loader svg.wfl-circle-middle circle.wfl-back { animation: wfl-circle-middle 1.8s ease infinite 0.25s; }
.wfl-wifi-loader svg.wfl-circle-middle circle.wfl-front { animation: wfl-circle-middle 1.8s ease infinite 0.1s; }

.wfl-wifi-loader svg.wfl-circle-inner {
  height: 34px;
  width: 34px;
}

.wfl-wifi-loader svg.wfl-circle-inner circle { stroke-dasharray: 22 66; }
.wfl-wifi-loader svg.wfl-circle-inner circle.wfl-back { animation: wfl-circle-inner 1.8s ease infinite 0.2s; }
.wfl-wifi-loader svg.wfl-circle-inner circle.wfl-front { animation: wfl-circle-inner 1.8s ease infinite 0.05s; }

.wfl-wifi-loader .wfl-text {
  position: absolute;
  bottom: -40px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: lowercase;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.wfl-wifi-loader .wfl-text::before,
.wfl-wifi-loader .wfl-text::after { content: attr(data-text); }
.wfl-wifi-loader .wfl-text::before { color: var(--text-color); }
.wfl-wifi-loader .wfl-text::after {
  color: var(--front-color);
  animation: wfl-text-animation 3.6s ease infinite;
  position: absolute;
  left: 0;
}

@keyframes wfl-circle-outer {
  0% { stroke-dashoffset: 25; }
  25% { stroke-dashoffset: 0; }
  65% { stroke-dashoffset: 301; }
  80% { stroke-dashoffset: 276; }
  100% { stroke-dashoffset: 276; }
}

@keyframes wfl-circle-middle {
  0% { stroke-dashoffset: 17; }
  25% { stroke-dashoffset: 0; }
  65% { stroke-dashoffset: 204; }
  80% { stroke-dashoffset: 187; }
  100% { stroke-dashoffset: 187; }
}

@keyframes wfl-circle-inner {
  0% { stroke-dashoffset: 9; }
  25% { stroke-dashoffset: 0; }
  65% { stroke-dashoffset: 106; }
  80% { stroke-dashoffset: 97; }
  100% { stroke-dashoffset: 97; }
}

@keyframes wfl-text-animation {
  0% { clip-path: inset(0 100% 0 0); }
  50% { clip-path: inset(0); }
  100% { clip-path: inset(0 0 0 100%); }
}

Licence MIT

Original author: 3HugaDa3

Copyright - 2025 3HugaDa3 (Daniil) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.