OptionalactiveOptionalanimateDefault whether zoom transitions animate. Overridden by IZoomOptions.animate. Default: false.
OptionalarrowOptionalblockCell type values that cannot be entered; movement snaps back to the previous cell.
OptionalcallbacksOptionalcellOptionalclickableOptionalcollideCell types that emit collision events upon entry (movement still succeeds unless blocked).
OptionalconstrainWhen zoom is set, keep movement inside the zoom window.
true (default): clamp/wrap to zoom; attempts past the window emit gridEventsEnum.ZOOM_EDGE.
false: full-matrix movement; leaving the window emits gridEventsEnum.ZOOM_EXIT.
OptionalcontainerOptionaleventTarget for dispatched CustomEvents carrying grid detail; defaults to window when available.
OptionalidOptionalinfiniteOptionalinfiniteOptionalinjectWhen true (default), GameGrid.render and GameGrid.refresh inject bundled
layout CSS into document.head once (guarded by style[data-gamegrid-styles]).
Set false to skip injection and style .gamegrid yourself.
OptionalmiddlewaresOptionalpost?: MiddlewareFn[]Invoked after merge; inspect merged state via GameGrid.getState.
Optionalpre?: MiddlewareFn[]Invoked synchronously before the patch merges into IState (see MiddlewareFn).
OptionalmoveMilliseconds to wait before accepting another directional move.
number: shared cooldown for any direction[Top, Right, Down, Left]: per-direction cooldowns (UP, RIGHT, DOWN, LEFT)Update at runtime via GameGrid.setOptions (no re-render required). Useful for temporary speed boosts such as power-ups.
OptionalmoveAllow-list of enterable ICell.type values when non-empty.
OptionalregionOpt-in region tracking. 2 = quadrants, 3 = ninths, etc.
Moves that change tile emit gridEventsEnum.REGION_CHANGE and update IState.region.
OptionalrewindMax length of IState.moves. Oldest entries drop first.
Values below 1 are treated as 1 (always keep the current cell). Default: 20.
OptionalrowOptionalslideWhen true with IOptions.regionDivisions, gridEventsEnum.ZOOM_EDGE auto-zooms to the adjacent region tile.
Default: false.
OptionalwasdOptionalzoomCSS transition duration (ms) for zoom slide. Default: 300.
OptionalzoomAppended to .gamegrid__viewport whenever zoom is active.
Runtime behaviour toggles, collision rules, middleware, callbacks, styling, and event routing.
Example