Skip to content
Type something to search...
Veltro Theme Documentation

Global Scripts & Interactions

src/layouts/components/widgets/GlobalScripts.astro initializes Veltro’s shared client behavior.

It handles:

  • selected Preline components, including accordions, collapse, overlays, selects, tabs, and tooltips
  • Lenis smooth scrolling and page-jump keyboard shortcuts
  • AOS initialization for marked content on non-mobile viewports
  • the cursor follower
  • section-title motion
  • sticky sidebars
  • horizontal scrolling and theme-specific hover interactions

The serialized client config is exposed as window.__veltroThemeConfig and contains the settings.smoothScroll and settings.cursor blocks.

Smooth Scroll

[settings.smoothScroll]
enable = true
respectReducedMotion = true
duration = 1.1
wheelMultiplier = 1
keyboardShortcuts = true
keyboardDuration = 0.9

Lenis is disabled on coarse pointers and when reduced motion is requested and respected.

Cursor

[settings.cursor]
enable = true
size = 20
hoverSize = 70
opacity = 0.5
borderWidth = 2
followRatio = 0.15

The cursor is automatically disabled on touch and coarse-pointer devices.

Heavier behavior is loaded during idle time or after the first relevant interaction. Header dropdown and overlay modules initialize directly in Header.astro so mobile navigation is available immediately.