Help guide

Direction Latch node

Updated June 21, 2026

Direction Latch node

Product media placeholder

Replace this area with a screenshot or short walkthrough video during the media sweep.

Maintains a ±1 direction value, flipped to +1 on rising-edge `forward` or -1 on rising-edge `backward`. Outputs `direction` (signed) plus `forwardActive` / `backwardActive` (binary 0/1) for use as multipliers in direction-aware animation expressions. Replaces the pulseTween-of-duration-0.001s + sign-extracting expressions hack.

Type directionLatchCategory inputsContext sharedDynamic ports noCompound no

Inputs

PortTypeDescription
forwardfloatRising-edge trigger. Sets direction to +1.
backwardfloatRising-edge trigger. Sets direction to -1.

Outputs

PortTypeDescription
directionfloatCurrent direction: +1 forward, -1 backward.
forwardActivefloat`1` when direction is +1, else `0`. Multiply forward-only values by this.
backwardActivefloat`1` when direction is -1, else `0`.

Parameters

ParameterTypeDefaultDescription
initialDirectionenum1Direction held until the first input pulse fires. Default forward. options 1, -1

Use cases

  • Bidirectional section-snap — wire wheel-down pulse to `forward`, wheel-up to `backward`. Multiply slide-in animation values by `direction` so forward/backward animations come from below/above respectively.
  • Toggle between two modes with hysteresis-free latching (last gesture wins).
  • Track scroll velocity sign without needing per-frame scroll tracking — only the direction of the most recent crossing matters.

Envelope

Use directionLatch as the node type inside a graph node envelope. Add id, optional params, optional connections, and optional activeWhen based on the guide context.

Generated source

Registry faster-motion-docs/node-registry.jsonCategory page /help/faster-motion/faster-motion-node-category-inputs/

Was this guide helpful?

Sunny Arora

Written by

Sunny Arora

Get technical deep dives delivered to your inbox

Join creators and developers who get exclusive insights, tutorials, and behind-the-scenes content every week.

No spam. Unsubscribe anytime.

Continue Exploring

You might also enjoy