# Avatar Crop

> A circular avatar crop tool with focal wheel zoom, live multi-size previews, a rule-of-thirds grid overlay, rotate/flip controls, and canvas-based crop output for profile picture editing, styled with the Darkroom design system.

- Category: Avatar
- Frameworks: Vanilla, React + CSS, React + Tailwind
- Design system: Ember Studio
- Dark mode: yes
- Access: premium (Atheros AI Pass)
- Tags: upload
- Page: https://builder.atheros.ai/components/avatar-crop
- Preview: https://d17nmjscumqk5d.cloudfront.net/builder/templates/tpl_builder_avatar_crop/preview-f0e93bc3900e.webp

## Features

- File upload, drag-and-drop, and paste-from-clipboard image input feeding a circular crop viewport
- Focal wheel/trackpad zoom that zooms toward the cursor position instead of the viewport center
- Labeled preview rail with three avatar sizes (Large 72px, Medium 52px, Small 40px) that updates live during drag and zoom, not only after Apply
- Rule-of-thirds grid overlay that appears while dragging or zooming and fades out when idle
- Rotate 90° clockwise and flip-horizontal controls that feed both the live transform and the canvas export
- Double-click or Reset button to re-center the image and reset zoom, rotation, and flip
- Zoom slider with magnifying-glass icons ranging from 1x to 3x magnification
- Drag-to-pan with pointer capture and smooth offset clamping so the image can never show gaps at any zoom or rotation
- Arrow key panning plus `+`/`-` keyboard zoom for fine-grained keyboard control
- Canvas-based crop that exports a 496px square JPEG at 90% quality
- CORS-safe Unsplash default portrait with an initials fallback when the image cannot load
- Fully respects `prefers-reduced-motion`

## Accessibility

- **File input** — Hidden `<input type="file">` with `aria-label`, triggered from the empty viewport
- **Viewport role** — `role="application"` with `aria-label` describing drag, scroll-zoom, and double-click reset
- **Keyboard panning** — Arrow keys move the image; `+`/`-` zoom when the viewport is focused
- **Zoom control** — Native `<input type="range">` with `aria-label` for zoom level
- **Tool buttons** — Native `<button>` elements with `aria-label` for rotate, flip, and reset
- **Preview rail** — `<aside>` landmark with `aria-label`; decorative initials marked `aria-hidden`
- **Grid overlay** — Decorative overlay marked `aria-hidden="true"`
- **Keyboard activation** — All actions use native buttons activated by Enter and Space
- **Focus indicators** — `:focus-visible` with `--ring` outline on all interactive elements
- **Reduced motion** — `prefers-reduced-motion: reduce` disables all animations

## Keyboard shortcuts

- `ArrowLeft` — Pan the image left within the crop viewport
- `ArrowRight` — Pan the image right within the crop viewport
- `ArrowUp` — Pan the image up within the crop viewport
- `ArrowDown` — Pan the image down within the crop viewport
- `+ / =` — Zoom in toward the center
- `-` — Zoom out toward the center
- `Enter` — Activate the focused button
- `Space` — Activate the focused button
- `Tab` — Move focus between interactive elements

## Common questions

**Which frameworks is Avatar Crop available in?**

Avatar Crop ships as Vanilla, React + CSS and React + Tailwind — HTML, CSS, JS and React source you can copy, download or clone into Atheros AI Builder.

**Is Avatar Crop free?**

Avatar Crop is a premium component. Anyone can preview it; the source, downloads and AI customisation are included with Atheros AI Pass.

**Does Avatar Crop support dark mode?**

Yes. Avatar Crop ships light and dark themes, both drawn from the Ember Studio design system's tokens. Switch the preview to dark mode to compare them.

## Get the code

Preview Avatar Crop live, then sign in to copy or download the source, apply another design system, or ask the AI assistant to change it: https://builder.atheros.ai/components/avatar-crop

Every component on https://builder.atheros.ai is also reachable from Claude Code, Cursor and Codex through the Atheros MCP server (paid plans). Component index: https://builder.atheros.ai/llms-components.txt
