Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 15.2.0 (2026-09-30)

### Features

- **Keyboard accessibility** ([#376](https://github.com/mosch/react-avatar-editor/issues/376), [#438](https://github.com/mosch/react-avatar-editor/issues/438)) — the canvas is now focusable (`tabIndex=0`, `role="application"`, ARIA labels). Arrow keys pan the image (`keyboardStep` px, ×10 with Shift), `+`/`-` zoom (0.1 step, 0.5 with Shift), Escape blurs the canvas. The canvas focuses on mousedown so keys work right after clicking.
- **Pinch-to-zoom** — two-finger pinch on touch devices zooms the image.
- **Wheel zoom** — opt-in mouse wheel / trackpad zoom via the new `enableWheelZoom` prop (default `false`).
- **`onRequestScaleChange` callback** — called with the requested scale for keyboard, pinch and wheel zoom. `scale` stays controlled, so update it in your state to apply the zoom.
- **`keyboardStep` prop** — pixels moved per arrow key press (default `1`).

### Chores

- Dependency bumps for security advisories.

## 15.1.0 (2026-03-21)

### Features
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ function MyEditor() {
| `onMouseUp` | `() => void` | | Called when the user releases the mouse after dragging. |
| `onMouseMove` | `(event) => void` | | Called on every mouse/touch move while dragging. |
| `onPositionChange` | `(position) => void` | | Called when the crop position changes. Receives `{ x, y }`. |
| `onRequestScaleChange` | `(scale) => void` | | Called when the user presses +/- keys to zoom. Receives the requested new scale value. |
| `onRequestScaleChange` | `(scale) => void` | | Called when the user zooms via +/- keys, pinch, or wheel. Receives the requested new scale. |
| `enableWheelZoom` | `boolean` | `false` | Zoom with the mouse wheel / trackpad. Requires `onRequestScaleChange`. |
| `keyboardStep` | `number` | `1` | Pixels to move per arrow key press. Shift multiplies by 10. |

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-avatar-editor",
"version": "15.1.0",
"version": "15.2.0",
"description": "Avatar / profile picture component. Resize and crop your uploaded image using a intuitive user interface.",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
Expand Down
Loading