StringTune/Docs

API Reference

Settings Reference

Global runtime settings, default values, and what each setting actually affects.

Settings Reference

Global settings are configured through stringTune.setupSettings(...).

This page documents the full set of defaults seeded by the runtime through setupSettings(...) in the StringTune constructor.

It covers the built-in global fallback keys. It does not try to enumerate every ad hoc module override you could pass into use(MyModule, settings).

Full default settings

KeyDefaultUsed for
global-classfalseEnables global scroll direction classes handled by the active scroll controller
offset-top0%Global top offset fallback for object progress and in-view calculations
offset-bottom0%Global bottom offset fallback for object progress and in-view calculations
key--progressDefault CSS custom property name used by progress-style modules
inview-top0%Global top in-view threshold fallback
inview-bottom0%Global bottom in-view threshold fallback
enter-eltopDefault element anchor for enter calculations
enter-vpbottomDefault viewport anchor for enter calculations
exit-elbottomDefault element anchor for exit calculations
exit-vptopDefault viewport anchor for exit calculations
parallax-bias0.0Global fallback bias for StringParallax
parallax0.2Global fallback factor for StringParallax
lerp0.2Generic lerp fallback used by modules that expose a lerp setting
cursor-lerp0.75Global cursor smoothing fallback used by CursorController and StringCursor
radius150Shared default radius used by cursor modules such as magnetic/attractor variants
strength0.3Shared default strength used by cursor modules such as magnetic/attractor variants
glide1Global fallback amount for StringGlide
anchorcenter centerGlobal fallback anchor for StringAnchor
timeout900Loading timeout used by StringLoading
alignmentcenterDefault cursor target alignment
target-disablefalseDisables cursor target behavior when set
target-style-disablefalseDisables built-in cursor target style writes when set
target-class``Default class name used for cursor target styling hooks
activefalseBase object-level fallback flag
fixedfalseBase object-level fallback flag
repeatfalseBase object-level fallback flag
self-disablefalseBase object-level fallback flag that suppresses style writes on the primary element
absfalseBase object-level fallback flag
easingcubic-bezier(0.25, 0.25, 0.25, 0.25)Generic easing fallback used by modules with easing support
glide-base-velocity0.00125Base velocity multiplier for StringGlide
glide-reduce-velocity0.0000625Reduced velocity multiplier for StringGlide
glide-negative-velocity-0.0001Negative velocity multiplier for StringGlide
position-strength3Position impulse strength for StringImpulse
position-tension0.05Position spring tension for StringImpulse
position-friction0.15Position damping for StringImpulse
position-max-velocity10Position max velocity clamp for StringImpulse
position-update-threshold0.1CSS update threshold for position writes in StringImpulse
rotation-strength0.75Rotation impulse strength for StringImpulse
rotation-tension0.06Rotation spring tension for StringImpulse
rotation-friction0.18Rotation damping for StringImpulse
rotation-max-angular-velocity6Angular velocity clamp for StringImpulse
rotation-max-angle18Rotation angle clamp for StringImpulse
rotation-update-threshold0.15CSS update threshold for rotation writes in StringImpulse
max-offset220Max translation offset for StringImpulse
sleep-epsilon0.01Rest threshold for StringImpulse
continuous-pushtrueKeeps applying impulse while active in StringImpulse

Example

TypeScript
stringTune.setupSettings({
  "offset-top": "-10%",
  "offset-bottom": "-10%",
  "cursor-lerp": 0.75,
  timeout: 900,
  parallax: 0.3,
  glide: 1.2,
});

Not configured through setupSettings

Smooth scroll feel is not tuned through setupSettings.

Use instance properties instead:

TypeScript
stringTune.scrollDesktopMode = "smooth";
stringTune.scrollMobileMode = "default";

stringTune.speed = 0.1;
stringTune.speedAccelerate = 0.5;

See Scroll Modes for the practical smooth-scroll tuning notes.

Important notes

  • StringLoading reads loading timeout from runtime settings, not from a string-timeout DOM attribute.
  • mobile scroll mode switching is width-based in the runtime, not a generic touch-device detector.
  • settings are global; they are not a substitute for per-module declarative attributes.