unstale

npm / nipplejs

nipplejs

What changed in nipplejs 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

13 breaking5 new APIs and options2 behavior and defaults11 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

nipplejs 131 changes

Breaking changes 13

  • The add() method is removed.

    1.0.0release notes

  • Undefined coordinates are no longer silently treated as 0.

    1.0.0release notes

  • Event callbacks now receive the event object, with event data accessed through evt.data, instead of receiving separate evt and data arguments.

    1.0.0release notes

  • The hide() method is removed.

    1.0.0release notes

  • The joystick element is now accessed through joystick.ui.el instead of joystick.el.

    1.0.0release notes

  • Replaces the v0 destroyed event.

    1.0.0release notes

  • Replaces manager.get() as a way to retrieve a joystick.

    1.0.0release notes

  • The manager.ids property is removed.

    1.0.0release notes

  • Replaces manager.id.

    1.0.0release notes

  • Replaces the v0 maxNumberOfNipples option.

    1.0.0release notes

  • The event fires on every pointermove rather than only when the direction changes.

    1.0.0release notes

  • The remove() method is removed.

    1.0.0release notes

  • The show() method is removed.

    1.0.0release notes

New APIs and options 5

  • Move event data includes the per-frame displacement of the joystick base when follow is enabled and the thumb moves past the radius.

    1.0.0release notes

  • Manually recalculates the zone bounding box and joystick positions after layout changes.

    1.0.0release notes

  • Provides an alternative to manager.get() for accessing joysticks.

    1.0.0release notes

  • Returns the current global logging level.

    1.0.0release notes

  • Sets the library's console output level globally.

    1.0.0release notes

Behavior and default changes 2

  • The zone is automatically watched for resize changes, handling most resize scenarios without application code.

    1.0.0release notes

  • The library warns at creation time when the zone element has position: static, which causes incorrect joystick positioning.

    1.0.0release notes

Fixes and other changes 11

  • Multiple managers no longer force-end sibling joysticks on pointerdown or pointerup; cleanup runs only for TouchEvents, while pointerup and pointercancel handle their own cleanup.

    1.0.4release notes

  • Each manager now checks its own zone when deciding whether to mount a joystick, allowing multiple managers to open joysticks simultaneously.

    1.0.3release notes

  • The handler type now narrows to the payload matching the event name, so users no longer need to cast handlers with as any.

    1.0.3release notes

  • Prevents rapid touch taps from spawning duplicate joysticks in static mode and its semi-mode and dataOnly static equivalents by making joysticks reusable on end instead of hidden.

    1.0.2release notes

  • Prevents addToDom() from redundantly firing the event on every start().

    1.0.0release notes

  • Preserves native event prototype properties so touch positions are not calculated as NaN.

    1.0.0release notes

  • Invalid positions no longer lead to undefined variable access after an error is logged.

    1.0.0release notes

  • Corrects the hidden state to use visibility instead of the invalid CSS value display: hidden.

    1.0.0release notes

  • Fixes mobile dual-stick setups by calling preventDefault only on move events; touch-action: none on the zone handles the rest.

    1.0.0release notes

  • A depth guard in processOnStart prevents infinite recursion.

    1.0.0release notes

  • Guards window access with typeof checks, allowing safer use in server-side rendering contexts.

    1.0.0release notes