Photo Capture Dialog
Fullscreen camera dialog that streams live video and captures a still on demand. Returns a base64 data URL via onCapture. Requires camera permission.
core/photo-capture-dialogInstallation
1 · Add registry to components.json
2 · Install component
Examples
Camera capture
Requires camera permission. Opens the device camera for live capture.
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
openreq | boolean | — | Controls dialog visibility. |
onOpenChangereq | (open: boolean) => void | — | Called when the dialog requests close. |
onCapturereq | (dataUrl: string) => void | — | Called with a base64 data URL of the captured frame. |
guideShape | "circle" | "rectangle" | "circle" | Overlay guide shape. |
helperText | string | — | Instructional text shown below the viewfinder. |
defaultFacing | "user" | "environment" | "user" | Preferred camera (front or back). |