Skip to content

useEntryAnimation

@astryxdesign/core v0.7.1 · useEntryAnimation

Parameters ​

NameTypeDefaultDescription
preset'slideDown' | 'slideUp' | 'fadeIn' | 'scaleIn''slideDown'Animation preset to apply on mount. slideDown drops in from above, slideUp rises from below, fadeIn only fades, and scaleIn fades while scaling up.

Returns ​

NameTypeDescription
entryClassstring | nullA shared motion class for the entry animation, or null if the element was rendered on initial page load (no animation needed). One of astryx-motion-slide-in-below, astryx-motion-slide-in-above, astryx-motion-fade-in, or astryx-motion-scale-in.