Skip to content

API ​

RC.15 (Beta): see combined values, native scroll, layout exits and keyed lists for the additions and platform limits.

Available in RC.12: interaction and depth adds portable drop zones, optional audio/cues, adapter inspection and Web path/3D/shadow contracts.

Web keyboard, sheets, navigation, physics and icons (available since RC.10).

Web support since RC.10: these effects are also available through runtime/scoped methods in /web. These APIs are included in RC.10.

Animating ​

target is a view or anything holding one (a template ref on an element or a component, an ElementRef). animate(), decay(), stop(), set() and sequence steps also accept arrays of targets.

animate() options also accept haptic: light, medium, heavy, { style, times }, or false. Feedback supports iOS and Android, respecting device settings.

Animations ​

What animate(), decay(), sequence() and the steps of a sequence return: await it, read finished, or call stop(). It resolves with true when it played to the end and false when it was stopped or taken over, and cancellation never rejects. Sequence setup/callback errors can reject finished after canceling its other work.

animate() and decay() return PlaybackAnimation: the base lifecycle plus pause(), play(), writable progress, and readonly paused/duration. Sequence and effect handles keep the base Animation contract.

Transitions ​

  • Springs: 'smooth' | 'snappy' | 'bouncy', { bounce, duration, velocity } or { stiffness, damping, mass, velocity }.
  • Tweens: { duration, ease, times, easeTrack }.
  • Timing: delay, repeat, repeatType: 'loop' | 'reverse', repeatDelay, stagger: number | { each, from }.
  • Layers: layer: 'name' plays on top of the property's other animations; stop(target, properties, { layer }) stops one layer.
  • Per property: any property name mapped to its own transition.
  • Relative keyframes: { relative: true } adds translation/rotation offsets and multiplies scale/opacity by their starting values.

Helpers ​

definePreset(name, preset), presets, springs, origamiSpring({ friction, tension }), cubicBezier, toView(target). toView() returns the NativeScript view behind any accepted target, for helpers that take the same targets as animate(). See custom presets for registration and typed names.

Vue ​

@rafaelaugusto/jolt/vue is a separate entry point for NativeScript-Vue 3: vAnimate (v-animate), vPress (v-press), JoltTransition, transitionHooks(props), useMotionScope(), useReducedMotion(), useKeyboard(), useMotionValue(), useBinding(), useScrollValue() and install(app), also the default export for app.use(). Types: AnimateValue, PressValue, TransitionProps. See the Vue guide.

Types ​

Step, SequenceOptions, SequencePosition, JoltConfig, KeyframeProperty, ScrollLinkedOptions, KeyboardOptions, ItemsOptions, ColorValue, ColorKeyframes, Keyframes, Transition, Spring, Tween, Preset, Presets, PresetName, SpringName, Easing, Animation, Target, DecayVelocity, DecayOptions, SymbolEffect, SymbolEffectName, SymbolEffectOptions, ShimmerOptions, LiquidOptions, LiquidEffect, LoaderOptions, LoaderStyle, TextOptions, RollOptions, RevealOptions, ConcealOptions, Haptic, HapticOptions, HapticStyle, ConfettiOptions, ParticleOptions and the rest exported from the package. configure({ timeScale }) sets global playback speed for animations started afterwards. configure({ timeScale, reducedMotion }) sets the global playback speed and the reduced-motion preference ('user', 'always' or 'never') for animations started afterwards. reducedMotion() and onReducedMotion(callback) read and watch that preference.

Types ​

Portable foundations (RC.12 work) ​

Portable foundations (RC.12 work): Pointer presence, coordinated property groups, renderer activity, bounded drawings and native press/shape fixes.

Released under the MIT License.