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-dialog

Installation

1 · Add registry to components.json

2 · Install component

Examples

Camera capture

Requires camera permission. Opens the device camera for live capture.

API Reference

PropTypeDescription
openreq
booleanControls dialog visibility.
onOpenChangereq
(open: boolean) => voidCalled when the dialog requests close.
onCapturereq
(dataUrl: string) => voidCalled with a base64 data URL of the captured frame.
guideShape
"circle" | "rectangle"Overlay guide shape.
helperText
stringInstructional text shown below the viewfinder.
defaultFacing
"user" | "environment"Preferred camera (front or back).