Cluster Leader Election
CSSCandidate cluster nodes participate in an asynchronous consensus election until an elected leader expands in topology authority and radiates leadership beacon waves.
- Tier
- CSS
- Dependencies
- None
- Duration
- 6.4 s, loops
- Categories
- Loaders and spinners
- Use cases
- Loading and waiting, Workflow and approvals
- Industries
- SaaS and software, IT services and infrastructure
- Style
- Minimal line · light stroke
- Set
- cluster
- Tags
- loopringpulsedots
Companion assets
The same artwork, not animated. Derived from the entry’s own resting state, so it matches exactly.
Code
animation.svg
<svg xmlns="http://www.w3.org/2000/svg" aria-labelledby="cluster-elect-title" class="pulsar pulsar-cluster-elect" data-pulsar="cluster-elect" role="img" viewBox="0 0 160 96"><title id="cluster-elect-title">Ring of candidate cluster nodes participating in leader election until one node wins and radiates leadership authority</title><circle cx="80" cy="48" r="26" fill="none" stroke="currentColor" stroke-dasharray="2 3" stroke-width=".5" opacity=".2"></circle><g fill="none" stroke="currentColor" stroke-width=".5" opacity=".15"><line x1="80" x2="103" y1="22" y2="35"></line><line x1="80" x2="103" y1="22" y2="61"></line><line x1="80" x2="80" y1="22" y2="74"></line><line x1="80" x2="57" y1="22" y2="61"></line><line x1="80" x2="57" y1="22" y2="35"></line></g><circle id="cluster-elect-wave1" cx="80" cy="22" r="6" fill="none" stroke="currentColor" stroke-width="1" opacity="0"></circle><circle id="cluster-elect-wave2" cx="80" cy="22" r="6" fill="none" stroke="currentColor" stroke-width=".8" opacity="0"></circle><g id="cluster-elect-n1"><circle cx="103" cy="35" r="3.5" fill="none" stroke="currentColor" stroke-width=".8"></circle><circle cx="103" cy="35" r="1.5" fill="currentColor"></circle></g><g id="cluster-elect-n2"><circle cx="103" cy="61" r="3.5" fill="none" stroke="currentColor" stroke-width=".8"></circle><circle cx="103" cy="61" r="1.5" fill="currentColor"></circle></g><g id="cluster-elect-n3"><circle cx="80" cy="74" r="3.5" fill="none" stroke="currentColor" stroke-width=".8"></circle><circle cx="80" cy="74" r="1.5" fill="currentColor"></circle></g><g id="cluster-elect-n4"><circle cx="57" cy="61" r="3.5" fill="none" stroke="currentColor" stroke-width=".8"></circle><circle cx="57" cy="61" r="1.5" fill="currentColor"></circle></g><g id="cluster-elect-n5"><circle cx="57" cy="35" r="3.5" fill="none" stroke="currentColor" stroke-width=".8"></circle><circle cx="57" cy="35" r="1.5" fill="currentColor"></circle></g><g id="cluster-elect-leader"><circle cx="80" cy="22" r="4.5" fill="none" stroke="currentColor" stroke-width="1.2"></circle><circle cx="80" cy="22" r="2.2" fill="currentColor"></circle><circle id="cluster-elect-crown" cx="80" cy="22" r="6.5" fill="none" stroke="currentColor" stroke-dasharray="2 2" stroke-width=".8" opacity="0"></circle></g></svg>
animation.css
.pulsar-cluster-elect {
--pulsar-accent: currentColor;
}
.pulsar-cluster-elect #cluster-elect-wave1,
.pulsar-cluster-elect #cluster-elect-wave2,
.pulsar-cluster-elect #cluster-elect-crown {
stroke: var(--pulsar-accent, currentColor);
}
.pulsar-cluster-elect #cluster-elect-leader circle:nth-child(2) {
fill: var(--pulsar-accent, currentColor);
}
.pulsar-cluster-elect [id^='cluster-elect-n'] circle:last-child {
fill: var(--pulsar-accent, currentColor);
}
/* Election flutter across nodes */
.pulsar-cluster-elect [id^='cluster-elect-n'] {
animation: cluster-elect-campaign 6000ms ease-in-out infinite;
}
@keyframes cluster-elect-campaign {
0%,
35% {
opacity: 0.8;
}
5%,
15%,
25% {
opacity: 0.2;
}
10%,
20%,
30% {
opacity: 1;
}
45%,
85% {
opacity: 0.35;
}
100% {
opacity: 0.8;
}
}
/* Leader expansion and victory */
.pulsar-cluster-elect #cluster-elect-leader {
transform-origin: 80px 22px;
animation: cluster-elect-victory 6000ms cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes cluster-elect-victory {
0%,
35% {
transform: scale(1);
}
45%,
85% {
transform: scale(1.35);
}
95%,
100% {
transform: scale(1);
}
}
.pulsar-cluster-elect #cluster-elect-crown {
animation: cluster-elect-crown-spin 6000ms linear infinite;
}
@keyframes cluster-elect-crown-spin {
0%,
35% {
opacity: 0;
}
45%,
85% {
opacity: 0.9;
}
95%,
100% {
opacity: 0;
}
}
/* Radiating leadership waves */
.pulsar-cluster-elect #cluster-elect-wave1 {
transform-origin: 80px 22px;
animation: cluster-elect-beacon 6000ms 0ms ease-out infinite;
}
.pulsar-cluster-elect #cluster-elect-wave2 {
transform-origin: 80px 22px;
animation: cluster-elect-beacon 6000ms 400ms ease-out infinite;
}
@keyframes cluster-elect-beacon {
0%,
40% {
opacity: 0;
transform: scale(0.5);
}
48% {
opacity: 0.8;
}
75% {
opacity: 0;
transform: scale(3.5);
}
100% {
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.pulsar-cluster-elect * {
animation: none !important;
}
.pulsar-cluster-elect #cluster-elect-leader {
transform: scale(1.35);
}
.pulsar-cluster-elect #cluster-elect-crown {
opacity: 0.9;
}
.pulsar-cluster-elect [id^='cluster-elect-n'] {
opacity: 0.35;
}
}