Un composant de chargement qui utilise un effet d’impulsion avec un bel anneau qui se propage comme des ondulations.

Aperçu

Cas d’utilisation et fonctionnalités

Ce « Pulse Ring Loader » est particulièrement efficace dans les situations suivantes.

Points de conception et d’UX

Comment personnaliser

##Code d’implémentation

<div class="pulse-loader-container">

<div class="pulse-ring"></div>

<div class="pulse-ring delay-1"></div>

<div class="pulse-ring delay-2"></div>

<div class="pulse-core"></div>

</div>



<style>
/* Placement du conteneur dans tout le chargeur */

.pulse-loader-container {

position: relative;

width: 100px;

height: 100px;

display: flex;

align-items: center;

justify-content: center;

}



/* Élément central du noyau */

.pulse-core {

width: 30px;

height: 30px;

background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);

border-radius: 50%;

position: absolute;

z-index: 10;

box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);

animation: core-pulse 2s infinite ease-in-out;

}



/* Élément anneau formant l'ondulation */

.pulse-ring {

position: absolute;

width: 30px;

height: 30px;

border-radius: 50%;

border: 2px solid rgba(168, 85, 247, 0.8);

box-sizing: border-box;

animation: ring-pulse 2.5s infinite cubic-bezier(0.215, 0.61, 0.355, 1);

opacity: 0;

}



/* Délai d'animation des ondulations (décalage temporel) */

.delay-1 {

animation-delay: 0.8s;

}



.delay-2 {

animation-delay: 1.6s;

}



/* Animation de pulsation du noyau */

@keyframes core-pulse {

0%, 100% {

  transform: scale(1);

  box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);

}

50% {

  transform: scale(1.2);

  /* Intensifier l'ombre lors du zoom pour amplifier l'effet lumineux */

  box-shadow: 0 0 25px rgba(168, 85, 247, 0.8), 0 0 40px rgba(236, 72, 153, 0.4);

}

}



/* Animation d'expansion des ondulations */

@keyframes ring-pulse {

0% {

  transform: scale(1);

  opacity: 1;

  border-width: 2px;

  border-color: rgba(99, 102, 241, 1);

}

50% {

  border-color: rgba(168, 85, 247, 0.5);

  border-width: 1px;

}

100% {

  transform: scale(3.5);

  opacity: 0;

  border-width: 0px;

  border-color: rgba(236, 72, 153, 0);

}

}

</style>

État de compatibilité du navigateur

| Navigateur | Statut de compatibilité | Remarques |

| --- | --- | --- |

| Chrome | ✅Compatible | |

| Safaris | ✅Compatible | |

| Firefox | ✅Compatible | |

| Bord | ✅Compatible | |