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-uploadInstallation
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
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Current image URL. |
onChangereq | (url: string | null) => void | — | Called when the image changes. |
circular | boolean | false | Circular crop and preview. |
onUpload | (blob: Blob) => Promise<string> | — | Custom upload handler; receives a cropped Blob and must return a URL. |
disabled | boolean | false | Disables all interactions. |