SecretoCho
menu

component 14 / 28WORKING

SC Golden Spiral

type
Code Component
platform
Framer
last update
read time
6–8 min
needs JavaScript

demo · runs with JavaScript

fig 00 · live demo, ported from SC_GoldenSpiral.tsx

Generates N points using the golden angle π(3−√5) with radius proportional to √(i/N); dots render as <circle> elements with optional SVG <animate> pulses sweeping inside→outside (or reverse) and CSS rotation on the <svg>.

An SVG point-field arranged along the golden-angle (Fermat) spiral. Each dot can pulse in size and opacity with phase offsets from the spiral index, and the entire field can rotate smoothly. Works great for meditative backgrounds, hero motifs, and data-art accents.

  • Visual
  • SVG
  • Generative Math

Main

Overview

Built With
React, SVG, CSS, Framer Code Component API
Layout Support
Fully Responsive or fixed width/height
Orientation
Full Fill motif
Ideal Use Case
Ambient hero visuals, decorative backgrounds, brand motion textures

Tags

  • golden-angle
  • spiral
  • generative
  • svg
  • pulse
  • animation
  • rotate
  • responsive

Code comment

/** * SC Golden Spiral * © SecretoCho Design 2025 * Golden-angle point layout with optional per-dot pulse and global rotation. * @framerDisableUnlink * @framerSupportedLayoutWidth any * @framerSupportedLayoutHeight any */

Dependencies

Technologies
None (pure SVG/React)
Notes
No external libs; uses native SVG <animate> for per-dot motion.

Complexity

Logic Level
Low–Medium (deterministic geometry + simple animation)
Runtime Cost
Low–Medium (hundreds of SVG circles + optional anim)
Component Size
~2–3 KB (raw TSX)
Notes
showFPS is debug-only; disable for production.

Guide

Instructions

  1. Add SCGoldenSpiral to your canvas; choose Size Mode = fixed (px) or dynamic (% of container).
  2. Set Points (e.g., 400–1200) and Dot Radius (1.5–3 for dense fields).
  3. Enable Pulse Effect to animate dot r and opacity; choose Duration, Min/Max Size, Min/Max Opacity, and Pulse Direction (inside or outside).
  4. Toggle Rotate for slow turntable motion; adjust Rotation Speed and Direction.
  5. Frame the motif via Anchor presets plus X/Y Offset.

Examples / Presets

  • Calm Aura

    points=700 · r=2 · pulseEffect=on · duration=4 · size 0.8–1.25 · opacity 0.25–0.9 · rotate off

  • Hero Drift

    points=900 · r=2 · pulseEffect=on · duration=3 · rotate on · speed=0.2 · dir=clockwise

  • Minimal Static

    points=500 · r=1.5 · pulseEffect=off · rotate off

Mechanics

How it Works

  • Golden-angle placement: For index i (0-based), uses idx=i+0.5, frac=idx/N, r=√(frac)*maxRadius, θ=idx*φ, φ=π(3−√5).
  • Responsive sizing: maxRadius derives from the smaller of width/height; in dynamic mode it scales via Width%/Height% of the container.
  • Pulsing: Each circle animates r and opacity with SVG <animate>, offset by its normalized frac. Direction flips phase (inside uses 1−frac).
  • Rotation: A requestAnimationFrame loop increments a local rotation state; applied as transform: rotate(...) on the <svg>.
  • Anchoring: Predefined anchors shift the cluster by ±¼ of the shorter side; X/Y Offset fine-tunes.

Performance & Tuning

  • SVG handles hundreds of circles well; thousands plus pulsing is still reasonable on desktops.
  • Prefer points ≤ 1200 on laptops; reduce dotRadius for density instead of adding excessive points.
  • Keep duration ≥ 2s for smoother, less battery-intense motion.
  • Disable showFPS when shipping.

Compatibility & Limits

  • Evergreen browsers support SVG animation broadly; older iOS Safari may need testing for heavy <animate> counts.
  • Rotation uses CSS transforms—GPU-friendly.
  • No SSR output differences; geometry is computed at mount with current box size.

Quality

Accessibility

  • Decorative by default; add aria-hidden="true" if it conveys no information.
  • If used behind text, ensure adequate contrast and avoid excessive motion that could distract.

Security & Privacy

  • No network, storage, or permissions.
  • Only window resize listeners; they’re removed on unmount.
  • No dangerouslySetInnerHTML or dynamic code execution.

Reference

Props

nametypedefaultdescription
pointsnumber600Number of dots in the spiral
dotRadiusnumber2Base circle radius (px)
durationnumber3Pulse cycle duration (seconds)
fillColorstring#ffffffDot fill color
pulseEffectbooleantrueEnable SVG pulse animation
opacityMinnumber0.3Minimum opacity during pulse (0–1)
opacityMaxnumber1Maximum opacity during pulse (0–1)
sizeMinnumber0.5Radius multiplier at pulse minimum
sizeMaxnumber1.5Radius multiplier at pulse peak
pulseDirectionenumoutsideWave phase origin (inside/outside)
sizeModeenumfixedSpiral bounds mode (fixed px or dynamic %)
ellipseWidthnumber200Horizontal bound in px (fixed mode)
ellipseHeightnumber600Vertical bound in px (fixed mode)
widthPercentnumber12Horizontal bound as % of container (dynamic)
heightPercentnumber48Vertical bound as % of container (dynamic)
positionAnchorenumcenterAnchor for the spiral (center/top/bottom/left/right/corners)
xOffsetnumber0Additional X translation (px)
yOffsetnumber0Additional Y translation (px)
showFPSbooleanfalseShow live FPS counter (debug only)
rotatebooleanfalseRotate the entire spiral group
rotationDirectionenumcounter-clockwiseRotation direction
rotationSpeednumber0.2Angular step in degrees per animation frame

Notes & Tips

  • To bias density inward or outward, adjust dotRadius and points together; the √r distribution already spreads points evenly.
  • For crisp aesthetics, keep fillColor opaque and modulate visibility via opacityMin/Max only.

Troubleshooting / FAQ

Looks off-center

Check Anchor + X/Y Offset; remember anchor shifts by ¼ of the shorter side.

Too busy/stuttery

Lower points, raise duration, or disable rotate.

Pulses feel chaotic

Reduce sizeMax and narrow opacity range (e.g., 0.35–0.8).

Source

Header comment

the CMS Code-Comment · SC_GoldenSpiral.tsx has no doc comment
/** * SC Golden Spiral * © SecretoCho Design 2025 * Golden-angle point layout with optional per-dot pulse and global rotation. * @framerDisableUnlink * @framerSupportedLayoutWidth any * @framerSupportedLayoutHeight any */

props [REF]

Key excerpt

The golden angle π(3−√5) and a radius of √(i/N): every point of the spiral is placed in this loop.

SC_GoldenSpiral.tsx · lines 13–27 · tsx
const GOLDEN_ANGLE = Math.PI * (3 - Math.sqrt(5))function generateSpiralPoints(N: number, maxRadius: number) {    const points = []    for (let i = 0; i < N; i++) {        const idx = i + 0.5        const frac = idx / N        const r = Math.sqrt(frac) * maxRadius        const theta = idx * GOLDEN_ANGLE        const x = r * Math.cos(theta)        const y = r * Math.sin(theta)        points.push({ x, y, frac })    }    return points}

Credits

Credits

  • Original animation: Filip Zrnzević — golden-angle (Fermat) spiral of SVG circles with phased <animate> pulses for radius and opacity.
  • Framer/React adaptation: SecretoCho Design — responsive sizing (fixed/dynamic), anchor presets + X/Y offsets, global rotation, inside/outside pulse direction, property controls, and optional FPS overlay.
  • Derivative work notice: This component is an adaptation of Filip Zrnzević’s original concept. Before commercial use or redistribution, review the original work’s license/terms and ensure proper attribution consistent with those terms.
inspired by
Filip Zrnzevic · codepen.io/filipz/pen/KwwKjxq

SecretoCho Design 2025

Disclaimer

Proves

Hiring a design engineer?

I’m open to senior design engineer roles: remote from Belgrade, or relocation with visa sponsorship. Write to me, or read the CV first. Client work stays selective, one project at a time.

sc@secretocho.design

read the CV · LinkedIn