s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Forms and controls

CameraCapture

No summary has been written for CameraCapture. Everything below is generated from the declaration shipped in 0.57.40 and describes the real contract.

Public export

typescript
import { CameraCapture } from '@happyvertical/smrt-ui/forms';
Import path
@happyvertical/smrt-ui/forms
Props
13
Props described
13 of 13
Bindable state
0
Callback events
2
Verified release
0.57.40

Props

NameTypeRequiredDescription
facingModeCameraFacingModeNoWhich camera to request. Re-requested on change while live.
disabledbooleanNoStops the camera and disables every action; a held photo is kept and, when committed, still posts with the form.
onCapture(result: CaptureResult) => voidNoCalled when the user commits a photo with "Use photo".
onClear() => voidNoCalled when a committed photo is discarded by "Retake" or a form reset.
namestringNoField name: the committed photo posts as a file in a native form.
fileNamestringNoPosted file name. Defaults to `photo.<ext>` for the image type.
imageType'image/jpeg' | 'image/png' | 'image/webp'NoEncoded image type.
qualitynumberNoEncoder quality for lossy types, 0 to 1.
fileInputFallbackbooleanNoOpt in to `<input type="file" capture>` for browsers without `getUserMedia`. Off by default: without it those browsers render the unsupported state.
labelsPartial<CameraCaptureLabels>NoText overrides; defaults come from the `ui` i18n catalog.
idstringNoDOM id of the component root.
classstringNoCSS class to apply to the component root.
interactionControlInteractionOptions | falseNoInteraction options or false to disable registration.

Bindable state

This component has no bindable public state.

Callback events

  • onCapture(result: CaptureResult) => void
  • onClear() => void

Examples and explanation