Pulsar

Toggle Diff

CSS

A toggle switch slides left, causing all inline redline marks across a page layout to fade out and leave only clean text.

Tier
CSS
Dependencies
None
Duration
4 s, loops
Categories
Transitions and reveals
Use cases
Documents and files, Transitions and reveals
Industries
Legal, Cross-industry
Style
Technical · light stroke
Set
redline
Tags
scalefademinimalone-shot

Companion assets

The same artwork, not animated. Derived from the entry’s own resting state, so it matches exactly.

Animated
CSS tier
Static vector
Toggle Diff, not animated
Download SVG

Code

animation.svg

<svg xmlns="http://www.w3.org/2000/svg" fill="none" aria-hidden="true" class="pulsar pulsar-redline-toggle-diff" data-pulsar="redline-toggle-diff" viewBox="0 0 160 96"><g class="toggle-control" transform="translate(80 20)"><rect width="44" height="20" x="-22" y="-10" stroke="currentColor" stroke-width="1.5" opacity=".5" rx="10"></rect><circle cx="12" r="7" stroke="var(--pulsar-accent, currentColor)" stroke-width="1.5" class="toggle-knob"></circle></g><g class="doc-lines-diff"><line x1="24" x2="60" y1="40" y2="40" stroke="var(--pulsar-accent, currentColor)" stroke-dasharray="5 3" stroke-linecap="round" stroke-width="1.75" class="dl d1"></line><line x1="24" x2="92" y1="54" y2="54" stroke="currentColor" stroke-linecap="round" stroke-width="1.75" class="dl d2"></line><line x1="24" x2="48" y1="68" y2="68" stroke="var(--pulsar-accent, currentColor)" stroke-dasharray="3 3" stroke-linecap="round" stroke-width="1.75" class="dl d3"></line><line x1="24" x2="136" y1="40" y2="40" stroke="currentColor" stroke-linecap="round" stroke-width="1.75" class="dl d4"></line><line x1="24" x2="112" y1="68" y2="68" stroke="currentColor" stroke-linecap="round" stroke-width="1.75" class="dl d5"></line></g></svg>

animation.css

.pulsar-redline-toggle-diff {
  display: block;
  width: 100%;
  height: 100%;
}
.pulsar-redline-toggle-diff .toggle-knob {
  animation: redline-toggle-diff-slide 4s ease-in-out infinite;
}
.pulsar-redline-toggle-diff .dl.d1,
.pulsar-redline-toggle-diff .dl.d3 {
  animation: redline-toggle-diff-hide-diff 4s ease-in-out infinite;
}
.pulsar-redline-toggle-diff .dl.d4,
.pulsar-redline-toggle-diff .dl.d5 {
  animation: redline-toggle-diff-show-clean 4s ease-in-out infinite;
}
@keyframes redline-toggle-diff-slide {
  0%,
  10% {
    transform: translateX(0);
  }
  40%,
  80% {
    transform: translateX(-24px);
  }
  90%,
  100% {
    transform: translateX(0);
  }
}
@keyframes redline-toggle-diff-hide-diff {
  0%,
  10% {
    opacity: 1;
  }
  40%,
  80% {
    opacity: 0;
  }
  90%,
  100% {
    opacity: 1;
  }
}
@keyframes redline-toggle-diff-show-clean {
  0%,
  10% {
    opacity: 0;
  }
  40%,
  80% {
    opacity: 1;
  }
  90%,
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pulsar-redline-toggle-diff .toggle-knob,
  .pulsar-redline-toggle-diff .dl.d1,
  .pulsar-redline-toggle-diff .dl.d3,
  .pulsar-redline-toggle-diff .dl.d4,
  .pulsar-redline-toggle-diff .dl.d5 {
    animation: none;
    transform: none;
    opacity: 0.8;
  }
}

From this family15 in Redline

See the family