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 initnipplejs 131 changes
Breaking changes 13
The add() method is removed.
Undefined coordinates are no longer silently treated as 0.
Event callbacks now receive the event object, with event data accessed through evt.data, instead of receiving separate evt and data arguments.
The hide() method is removed.
The joystick element is now accessed through joystick.ui.el instead of joystick.el.
Replaces the v0 destroyed event.
Replaces manager.get() as a way to retrieve a joystick.
The manager.ids property is removed.
Replaces manager.id.
Replaces the v0 maxNumberOfNipples option.
The event fires on every pointermove rather than only when the direction changes.
The remove() method is removed.
The show() method is removed.
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.
Manually recalculates the zone bounding box and joystick positions after layout changes.
Provides an alternative to manager.get() for accessing joysticks.
Returns the current global logging level.
Sets the library's console output level globally.
Behavior and default changes 2
The zone is automatically watched for resize changes, handling most resize scenarios without application code.
The library warns at creation time when the zone element has position: static, which causes incorrect joystick positioning.
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.
Each manager now checks its own zone when deciding whether to mount a joystick, allowing multiple managers to open joysticks simultaneously.
The handler type now narrows to the payload matching the event name, so users no longer need to cast handlers with
as any.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.
Prevents addToDom() from redundantly firing the event on every start().
Preserves native event prototype properties so touch positions are not calculated as NaN.
Invalid positions no longer lead to undefined variable access after an error is logged.
Corrects the hidden state to use visibility instead of the invalid CSS value display: hidden.
Fixes mobile dual-stick setups by calling preventDefault only on move events; touch-action: none on the zone handles the rest.
A depth guard in processOnStart prevents infinite recursion.
Guards window access with typeof checks, allowing safer use in server-side rendering contexts.