Options
Here you can find a complete reference for all HoverTilt props and options.
Interaction Props
Section titled “Interaction Props”Props which affect the interaction/animation of the component, such as tilt factor, scale factor, and spring options.
tiltFactor
Section titled “tiltFactor”<HoverTilt tiltFactor={1.5}><hover-tilt tilt-factor="1.5">- Type:
number - Default:
1 - Description: Controls the intensity of horizontal tilt.
Higher values create more pronounced tilt effects.
tiltFactorY
Section titled “tiltFactorY”<HoverTilt tiltFactorY={0.5}><hover-tilt tilt-factor-y="0.5">- Type:
number|undefined - Default:
tiltFactor(same value as tiltFactor, unless overridden) - Description: Controls the intensity of vertical tilt.
Useful for creating asymmetric tilt effects.
scaleFactor
Section titled “scaleFactor”<HoverTilt scaleFactor={1.1}><hover-tilt scale-factor="1.1">- Type:
number - Default:
1 - Description: Scale multiplier applied on hover.
Values greater than1will scale up, values less than1will scale down.
springOptions
Section titled “springOptions”<HoverTilt springOptions={{ stiffness: 0.3, damping: 0.7 }}><hover-tilt spring-options='{"stiffness": 0.3, "damping": 0.7}'>- Type:
{ stiffness?: number, damping?: number } - Default:
{ stiffness: 0.2, damping: 0.8 } - Description: Physics options for scale and opacity animations.
Based on the Svelte Spring values. Higher stiffness = faster response, higher damping = less oscillation.
tiltSpringOptions
Section titled “tiltSpringOptions”<HoverTilt tiltSpringOptions={{ stiffness: 0.3, damping: 0.7 }}><hover-tilt tilt-spring-options='{"stiffness": 0.3, "damping": 0.7}'>- Type:
{ stiffness?: number, damping?: number }|undefined - Default: Uses
springOptionsif not specified - Description: Separate physics options for tilt animations. Allows different animation feel for tilt vs scale.
enterDelay
Section titled “enterDelay”<HoverTilt enterDelay={300}><hover-tilt enter-delay="300">- Type:
number - Default:
0 - Description: Delay in milliseconds before activating the component when cursor enters. Helps prevent flickering when cursor briefly enters the element.
exitDelay
Section titled “exitDelay”<HoverTilt exitDelay={300}><hover-tilt exit-delay="300">- Type:
number - Default:
200 - Description: Delay in milliseconds before animating back to default state when cursor leaves. Helps prevent flickering when cursor briefly leaves the element.
Aesthetic Props
Section titled “Aesthetic Props”These are props that affect the visual appearance of the component, such as adding a shadow, or increasing the intensity of the glare effect.
<HoverTilt class="my-custom-class"><hover-tilt class="my-custom-class">- Type:
string|undefined - Default:
undefined - Description: CSS class to apply to the container/host element.
shadow
Section titled “shadow”<HoverTilt shadow><hover-tilt shadow>- Type:
boolean|undefined - Default:
false - Description: Enables dynamic shadow that moves with the tilt effect.
Need a resting shadow or bespoke multi-layer drop shadow? See Advanced → Shadows and Advanced → Custom Shadow for detailed walkthroughs.
shadowBlur
Section titled “shadowBlur”<HoverTilt shadow shadowBlur={40}><hover-tilt shadow shadow-blur="40">- Type:
number|undefined - Default:
22 - Description: Blur radius for the shadow effect (in pixels). Only applies when
shadowistrue.
For precise control (multiple blur layers, neon rims, etc.) override
--hover-tilt-custom-shadowas shown in Advanced → Custom Shadow.
blendMode
Section titled “blendMode”<HoverTilt blendMode="overlay"><hover-tilt blend-mode="overlay">- Type:
string|undefined - Default:
"overlay" - Description: CSS blend mode for the glare effect. Common values:
overlay,screen,multiply,plus-lighter, etc.
glareIntensity
Section titled “glareIntensity”<HoverTilt glareIntensity={1.5}><hover-tilt glare-intensity="1.5">- Type:
number - Default:
1 - Description: Intensity of the glare effect. Values greater than
1increase intensity, values less than1decrease it. (values over 4 will not really do anything with the default glare gradient)
glareHue
Section titled “glareHue”<HoverTilt glareHue={180}><hover-tilt glare-hue="180">- Type:
number|undefined - Default:
270(lavendar-ish) - Description: Hue value (0-360) for the glare color. Adjusts the color of the glare effect.
glareMask
Section titled “glareMask”<HoverTilt glareMask="url(#mask)"><hover-tilt glare-mask="url(#mask)">- Type:
string|undefined - Default:
undefined(no mask) - Description: CSS mask image for the glare effect. Allows custom masking of the glare to specific areas.
See Advanced → Glare Masks for layered foil/etch examples and troubleshooting tips.
glareMaskMode
Section titled “glareMaskMode”<HoverTilt glareMaskMode="luminance"><hover-tilt glare-mask-mode="luminance">- Type:
'match-source' | 'luminance' | 'alpha' | 'none' | undefined - Default:
undefined(browser default behavior is ‘match-source’) - Description: CSS
mask-modefor the glare mask. Controls how the mask is interpreted.
The Glare Masks guide compares
match-source,luminance, andalphawith visual callouts.
glareMaskComposite
Section titled “glareMaskComposite”<HoverTilt glareMaskComposite="add"><hover-tilt glare-mask-composite="add">- Type:
'add' | 'subtract' | 'exclude' | 'intersect' | undefined - Default:
undefined(browser default behavior is ‘add’) - Description: Composite operation for multiple masks. Only useful if applying multiple masks.
Visit Advanced → Glare Masks to see
addvsintersectin action on Pokémon-style foil art.