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
| Key | Default | Used for |
|---|---|---|
global-class | false | Enables global scroll direction classes handled by the active scroll controller |
offset-top | 0% | Global top offset fallback for object progress and in-view calculations |
offset-bottom | 0% | Global bottom offset fallback for object progress and in-view calculations |
key | --progress | Default CSS custom property name used by progress-style modules |
inview-top | 0% | Global top in-view threshold fallback |
inview-bottom | 0% | Global bottom in-view threshold fallback |
enter-el | top | Default element anchor for enter calculations |
enter-vp | bottom | Default viewport anchor for enter calculations |
exit-el | bottom | Default element anchor for exit calculations |
exit-vp | top | Default viewport anchor for exit calculations |
parallax-bias | 0.0 | Global fallback bias for StringParallax |
parallax | 0.2 | Global fallback factor for StringParallax |
lerp | 0.2 | Generic lerp fallback used by modules that expose a lerp setting |
cursor-lerp | 0.75 | Global cursor smoothing fallback used by CursorController and StringCursor |
radius | 150 | Shared default radius used by cursor modules such as magnetic/attractor variants |
strength | 0.3 | Shared default strength used by cursor modules such as magnetic/attractor variants |
glide | 1 | Global fallback amount for StringGlide |
anchor | center center | Global fallback anchor for StringAnchor |
timeout | 900 | Loading timeout used by StringLoading |
alignment | center | Default cursor target alignment |
target-disable | false | Disables cursor target behavior when set |
target-style-disable | false | Disables built-in cursor target style writes when set |
target-class | `` | Default class name used for cursor target styling hooks |
active | false | Base object-level fallback flag |
fixed | false | Base object-level fallback flag |
repeat | false | Base object-level fallback flag |
self-disable | false | Base object-level fallback flag that suppresses style writes on the primary element |
abs | false | Base object-level fallback flag |
easing | cubic-bezier(0.25, 0.25, 0.25, 0.25) | Generic easing fallback used by modules with easing support |
glide-base-velocity | 0.00125 | Base velocity multiplier for StringGlide |
glide-reduce-velocity | 0.0000625 | Reduced velocity multiplier for StringGlide |
glide-negative-velocity | -0.0001 | Negative velocity multiplier for StringGlide |
position-strength | 3 | Position impulse strength for StringImpulse |
position-tension | 0.05 | Position spring tension for StringImpulse |
position-friction | 0.15 | Position damping for StringImpulse |
position-max-velocity | 10 | Position max velocity clamp for StringImpulse |
position-update-threshold | 0.1 | CSS update threshold for position writes in StringImpulse |
rotation-strength | 0.75 | Rotation impulse strength for StringImpulse |
rotation-tension | 0.06 | Rotation spring tension for StringImpulse |
rotation-friction | 0.18 | Rotation damping for StringImpulse |
rotation-max-angular-velocity | 6 | Angular velocity clamp for StringImpulse |
rotation-max-angle | 18 | Rotation angle clamp for StringImpulse |
rotation-update-threshold | 0.15 | CSS update threshold for rotation writes in StringImpulse |
max-offset | 220 | Max translation offset for StringImpulse |
sleep-epsilon | 0.01 | Rest threshold for StringImpulse |
continuous-push | true | Keeps 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
StringLoadingreads loading timeout from runtime settings, not from astring-timeoutDOM 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.