When to use it. A live camera cell (Pro) that scans QR codes, barcodes, and printed text the moment they enter the frame, and can capture snapshots on demand. Detections fire the control's action over the mesh immediately — point the camera at a code and the data is already on your server.
Type
camera
Also titled
Camera
Default size
3 rows × 4 columns
Symbol
camera.viewfinder
Docs
Docs complete
Search for it as
photo
picture
scan
capture
video
webcam
Rendered by the app
Fields
13 fields you can set on a camera control. Every control also takes the shared fields (id, position, span, sync, action).
Fields
Field
Type
Default
What it does
Titlelabel
text
—
The name shown on top
Shows this text as the header above the camera.
Scans forscan
listone of 4
[barcode]
What the camera looks for
Chooses whether the live viewfinder reads barcodes, printed text, or both.
{ value: barcode
since: next }
{ value: text
since: next }
Barcode typessymbologies
listone of 36
—
Which barcode types to read
Limits scanning to the listed barcode types; leave empty to read every supported type.
{ value: qr
since: next }
{ value: microQR
since: next }
{ value: ean13
since: next }
{ value: ean8
since: next }
{ value: upce
since: next }
{ value: gs1DataBar
since: next }
{ value: gs1DataBarExpanded
since: next }
{ value: gs1DataBarLimited
since: next }
{ value: aztec
since: next }
{ value: dataMatrix
since: next }
{ value: pdf417
since: next }
{ value: microPDF417
since: next }
{ value: code128
since: next }
{ value: code39
since: next }
{ value: code93
since: next }
{ value: itf14
since: next }
{ value: i2of5
since: next }
{ value: codabar
since: next }
Send whensendMode
choiceone of 2
auto
Send on its own or on tap
Decides whether detections send themselves or wait for you to tap one.
autodefaultevery steady detection is sent on its own and is the default
taponly the item you tap in the viewfinder is sent
debouncedebounce
number0–30step 1
3
Wait before a repeat scan
Holds back the same scanned value from firing again for this many seconds (0 to 30).
Torchtorch
on / off
true(on)
Show the flashlight button
Shows a torch toggle in the viewfinder while scanning.
Snapshotsnapshot
on / off
false(off)
Show a photo button
Shows a shutter button that takes a photo while the camera is running.
Photo actionsnapshotAction
object
—
What happens when you take a photo
Runs this command with the photo each time the shutter is pressed.
Vibration on scanhaptic
choiceone of 9
light
The buzz you feel on a scan
Plays this haptic on the phone each time a detection is sent.
lightdefaulta faint tick
mediuma normal tap
heavya firm thump
rigida firm sharp click
softa gentle cushioned tap
successa short double-tap for done
warninga sharper alert buzz
errora harsh triple buzz
selectiona tiny click like scrolling a picker
Symbolicon
text
—
The picture on the start card
Draws this SF Symbol on the Tap to Start card instead of the camera glyph.
snapshotQualitysnapshotQuality
number0–1step 0.05
0.6
How sharp the photo is
Sets the photo's JPEG quality from 0 to 1; it is lowered automatically if the photo is too big to send.
snapshotMaxDimensionsnapshotMaxDimension
number240–4096step 1
1280
Biggest photo size
Caps the photo's longest side, 240 to 4096 pixels.
Title shownhideLabel
on / off
false(off)
Hide the title
Hides the header title, and the LIVE chip moves into the viewfinder.
Theme fields
Restyle one control by setting these in its theme object; a layout's theme sets them for every control.
Theme fields
Field
Type
Default
What it does
accentColortheme.accentColor
color
#667eea
Size of the title text
Sets the title text size from 8 to 24 pt.
Value text sizetheme.valueFontSize
number8–48step 1
14
Size of the value text
Sets the value text size from 8 to 48 pt.
Emits and receives
What this control sends when you use it, and what it can show or follow when data arrives.
Emits
Emits
Sends
When
Type
What it sends
When the camera reads a code or textvalue
detect
string
the decoded code or recognised text
In auto mode a steady detection sends once, and the same value waits out the debounce before it can send again; in tap mode only the item you tap sends. The shutter, if on, sends the snapshot to its own action
Example: Sample A
Examples
3 examples, each one a control you can paste into a layout.
The camera never starts on its own. It renders as a "Tap to Start" card; only a tap on the control opens the viewfinder, a red LIVE chip shows the whole time it runs, and it stops automatically the moment the app leaves the foreground or the control scrolls off screen. A pushed or synced layout cannot turn the camera on remotely.
Substitution tokens
Scan detections fire action with:
{{value}} — the decoded string (QR payload, barcode digits, or recognized text)
{{kind}} — what was read: a symbology name (qr, ean13, …) or text
Snapshots fire snapshotAction with:
{{image}} — the JPEG as base64 (no data-URL prefix)
{{width}} / {{height}} — pixel dimensions
The control's stored value is the last scanned string, so Visibility conditions and Sync readback see it.
Behavior
Tap to start; LIVE chip while running; tap ✕ (or background the app) to stop
Detections are highlighted in the viewfinder; auto mode sends them as they stabilize, tap mode waits for a tap
The same value re-fires only after debounce seconds
Requires camera permission (prompted on first start) and a device with a camera + A12 or later; the cell shows a friendly message otherwise
Snapshots are size-capped (~500 KB JPEG) so they always fit a mesh frame; expect ~1 MB base64 on the wire