Photo Upload

Avatar/profile photo upload with drag-and-drop, camera capture (device-dependent), and ImageCropper integration. Exposes a usePhotoUpload hook for headless control.

core/photo-upload

Installation

1 · Add registry to components.json

2 · Install component

Examples

Circular avatar upload

Drag a file or click to browse. Camera button appears on supported devices.

API Reference

PropTypeDescription
value
stringCurrent image URL.
onChangereq
(url: string | null) => voidCalled when the image changes.
circular
booleanCircular crop and preview.
onUpload
(blob: Blob) => Promise<string>Custom upload handler; receives a cropped Blob and must return a URL.
disabled
booleanDisables all interactions.