Help guide

Bidirectional Counter node

Updated June 21, 2026

Bidirectional Counter node

Product media placeholder

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

Clamped integer counter with separate `increment` and `decrement` inputs. Counter never grows past `max` or below `min` — out-of-range pulses are silently absorbed inside the node, so the visible `value` always reflects bounds. Sister of `pulseCounter`, but bidirectional and clamped. Avoids the `cDn − cUp` two-counter-subtract hack and its over-scroll drift bug at boundaries.

Type bidirectionalCounterCategory inputsContext sharedDynamic ports noCompound no

Inputs

PortTypeDescription
incrementfloatRising-edge trigger. Advances counter by `step`, clamped at `max`.
decrementfloatRising-edge trigger. Advances counter by `-step`, clamped at `min`.
resetfloatRising-edge trigger. Returns counter to `start`.

Outputs

PortTypeDescription
valuefloatCurrent counter value. Always in [`min`, `max`].

Parameters

ParameterTypeDefaultDescription
startint0Initial value (and reset target).
minint0Lower clamp bound.
maxint10Upper clamp bound.
stepint1Magnitude of each increment / decrement. min 1

Use cases

  • Section-snap navigation — wire wheel-down pulse to `increment`, wheel-up to `decrement`. `value` is the active section index, always in [0, N-1] with no boundary drift.
  • Hover-driven step counter — `enter` and `leave` pulses with `min: 0, max: 1` give a clean 0/1 binary state.
  • Click-driven page navigator — Next/Prev button pulses with bounded counter.

Envelope

Use bidirectionalCounter 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