StealThis .dev

SVG Workflow Animation

SVG connector paths draw themselves as you scroll using stroke-dasharray/dashoffset technique. Workflow nodes and labels appear in sequence with scroll-triggered reveals.

Open in Lab
gsapscrolltriggersvgstroke-dasharraylenis
Targets: JS HTML

Code

:root {
  --bg: #070a12;
  --text: #f0f4fb;
  --panel: #121a2b;
  --border: #263249;
  --accent: #86e8ff;
  --muted: #8a95a8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(134, 232, 255, 0.04) 0%, rgba(174, 82, 255, 0.04) 100%);
}

.hero .content {
  max-width: 600px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
}

/* Workflow Section */
.workflow-section {
  padding: 6rem 2rem;
  background: rgba(18, 26, 43, 0.5);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.workflow-wrapper {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

#workflow-svg {
  width: 100%;
  height: auto;
  max-height: 650px;
  display: block;
  overflow: visible;
}

/* SVG node text */
#workflow-svg text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
}

.node-label {
  font-size: 13px;
  fill: var(--text);
}

/* Connect lines — initially faint */
.connect-line {
  stroke: var(--border);
  opacity: 0.4;
}

/* Details Section */
.details-section {
  max-width: 800px;
  margin: 4rem auto;
  padding: 4rem 2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 26, 43, 0.8);
}

.content {
  max-width: 800px;
  margin: 0 auto;
}

.details-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.details-section h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.details-section p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.details-section ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.details-section ol li {
  color: var(--muted);
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

code {
  background: rgba(134, 232, 255, 0.1);
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
}

.btn-back {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: rgba(134, 232, 255, 0.8);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .workflow-section { padding: 4rem 1rem; }
  .details-section { margin: 2rem auto; padding: 2rem 1.5rem; }
  .details-section h2 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .subtitle { font-size: 1rem; }
}

html.reduced-motion * {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
}

SVG Workflow Animation

SVG connector paths draw themselves as you scroll using stroke-dasharray/dashoffset technique. Workflow nodes and labels appear in sequence with scroll-triggered reveals.

Source

  • Repository: libs-genclaude
  • Original demo id: 40-svg-workflow-animation

Notes

SVG connector paths draw themselves as you scroll using stroke-dasharray/dashoffset technique. Workflow nodes and labels appear in sequence with scroll-triggered reveals.