API Reference
March 9, 2026 ยท View on GitHub
This page groups the current public exports from ng-motion by area. It is a reference map, not a replacement for the concept guides.
Core
NgmMotionDirective: main directive for declarative motionprovideMotionConfig(config): global DI-based defaultsMOTION_CONFIG: config injection tokenVERSION: library version constant
Core Types
MotionValueMotionConfigTarget,TargetAndTransition,TransitionVariants,Variant,VariantLabelsMotionStyle,ResolvedValuesAnimationDefinition,AnimationPlaybackControls,AnimationStateKeyframeOptions,SpringOptions,InertiaOptions,TransformOptionsMotionNodeOptions,TargetResolver,ReducedMotionConfig
Motion Values and Hooks
useMotionValue(initial)useSpring(source, options?)useTransform(...)useVelocity(value)useTime()useMotionTemplate(strings, ...values)useMotionValueEvent(value, event, callback)useAnimationFrame(callback)useCycle(...items)useReducedMotion()useWillChange()useInView(target, options?)UseInViewOptionsuseScroll(options?)isMotionValue(value)
Gestures and Drag
HoverFeaturePressFeatureFocusFeatureInViewFeatureDragGesturePanGesturePanSessionVisualElementDragControlsDragControlsuseDragControls()EventInfo,PressGestureInfo,PanInfo,DragDirectionViewportOptions,Constraints,BoundingBox
Presence
NgmPresenceDirectivePRESENCE_CONTEXTcreatePresenceContext()NgmPresenceContextExitAnimationFeatureuseIsPresent()usePresence()usePresenceList()PresenceListState,UsePresenceListOptions
Layout
NgmLayoutGroupDirectiveLAYOUT_GROUPLayoutGroupContextProps
Scroll
scroll(onScroll, options?)scrollInfo(onScroll, options?)ScrollOffset: preset offset collections such asEnter,Exit,Any, andAllScrollOptions,ScrollInfo,AxisScrollInfoOnScroll,OnScrollInfo,ScrollInfoOptions,ScrollOffsetTypeUseScrollOptions,ScrollMotionValues
Reorder
NgmReorderGroupDirectiveNgmReorderItemDirectiveREORDER_CONTEXTcheckReorder()autoScrollIfNeeded()resetAutoScrollState()ReorderContextProps,ItemData
Imperative Animation
animate(...)stagger(...)useAnimate()ScopedAnimatecreateAnimationsFromSequence()AnimationSequence,SequenceOptions,SequenceTime
Feature Loading and Advanced Setup
provideMotionFeatures(bundle)ngmAnimationFeaturesngmAllFeaturesNgmFeatureBundleNgmLazyFeatureBundleinitNgmFeatures()loadNgmFeatures(features)
Visual Element Adapters and Utilities
createVisualElement()mountVisualElement()updateVisualElement()unmountVisualElement()createHtmlVisualState()createHtmlRenderState()createSvgVisualElement()createSvgVisualState()createSvgRenderState()isSVGElement()onCleanup()resolveInput()- raw motion-dom re-exports:
motionValue,animateValue,animateSingleValue,frame,cancelFrame