Guide / Controls / Readouts

QR code

A code a phone camera can scan

When to use it. A display control that renders a QR code image from static text or a dynamically synced value — useful for sharing URLs, connection strings, or codes on screen. (This is unrelated to *pairing this device* to a live editing session, which uses the camera scanner, not this control.)

Type
qrCode
Also titled
QR Code
Default size
2 rows × 2 columns
Symbol
qrcode
Docs
Docs complete
Search for it as
  • qr
  • barcode
  • scan
  • code
  • link
  • share
QR code: Wi-Fi sharing QR code
Rendered by the app

Fields

6 fields you can set on a qrCode control. Every control also takes the shared fields (id, position, span, sync, action).

Fields
FieldTypeDefaultWhat it does
Titlelabeltext—

The words under the code

Shows this text in a small line below the QR code.

texttexttext—

Content to encode until a connected value is available

Sets the content the code encodes; a synced value replaces it as soon as one arrives.

Code colortintcolor#FFFFFF

The color of the code squares

Recolors the dark squares of the code; keep it strongly different from the background so cameras can read it.

Code backgroundqrBackgroundcolor—

The patch behind the code

Fills a solid color behind the squares; left empty, the card shows through.

Error correctioncorrectionLevelchoiceone of 4M

How much damage the code can survive

Changes how dense the code looks: higher levels add more squares so a scratched or covered code still scans.

  • Llowest correction, simplest code, for clean screens
  • M defaultmedium correction, a good everyday balance
  • Qhigher correction, survives some smudging
  • Hhighest correction, densest code, survives scratches or a logo over it
BackgroundhideBackgroundon / offfalse (off)

The frosted card behind the code

On removes the glass card so the code sits straight on the page; off keeps the card.

Emits and receives

What this control sends when you use it, and what it can show or follow when data arrives.

Receives

Receives
TakesFromTypeWhat it does
valueshowhub, mqtt, http, store, derivestring

the text to turn into a code

the code is redrawn to encode the new text, replacing the configured text

Example: Sample A

Sample

The placeholder value the editor shows before real data arrives.

  • Sample A then Sample B

Examples

5 examples, each one a control you can paste into a layout.

Wi-Fi sharing QR code

Shows a static Wi-Fi join code with the highest error correction, so guests can scan it to connect.

JSON 10 lines
{
  "type": "qrCode",
  "id": "wifi-qr",
  "position": [0, 0],
  "span": [2, 2],
  "label": "Guest Wi-Fi",
  "text": "WIFI:T:WPA;S:GuestNetwork;P:welcome123;;",
  "tint": "#FFFFFF",
  "correctionLevel": "H"
}

Open in CAR-TER

QR code: Wi-Fi sharing QR code
Rendered by the app

Code on a solid background

Fills a white patch behind a dark code, the most reliable look for cameras in dark mode.

JSON 2 lines
{ "type": "qrCode", "id": "link-qr", "position": [0, 0], "span": [2, 2], "label": "Open the guide",
  "text": "https://example.com/guide", "tint": "#000000", "qrBackground": "#FFFFFF" }

Open in CAR-TER

QR code: Code on a solid background
Rendered by the app

Every error-correction level

Shows the lowest level, a sparse code for short text on a clean screen; the other levels (M, Q, H) use the same field and add more squares each step.

JSON 2 lines
{ "type": "qrCode", "id": "short-qr", "position": [0, 0], "span": [2, 2], "label": "Short link",
  "text": "https://example.com", "correctionLevel": "L" }

Open in CAR-TER

QR code: Every error-correction level
Rendered by the app

Code without the card

Removes the glass card so the code sits straight on the page.

JSON 2 lines
{ "type": "qrCode", "id": "bare-qr", "position": [0, 0], "span": [2, 2], "label": "Bare code",
  "text": "https://example.com", "hideBackground": true }

Open in CAR-TER

QR code: Code without the card
Rendered by the app

Live code from a synced value

Encodes whatever value arrives over MeshSocket, such as a rotating pairing code; the static text shows until the first value comes in.

JSON 3 lines
{ "type": "qrCode", "id": "pair-qr", "position": [0, 0], "span": [2, 2], "label": "Pairing code",
  "text": "waiting",
  "sync": [{ "method": "meshsocket", "type": "listen", "event": "broadcast", "filter": { "device": "server" }, "valuePath": "pair_url" }] }

Open in CAR-TER

QR code: Live code from a synced value
Rendered by the app

Try it on your phone

carterkit serves a small hub on your computer and pushes one example to CAR-TER on your iPhone or iPad. Pair once with the code it prints.

  1. Install the Python kit.

    pip install carterkit
  2. Show “Wi-Fi sharing QR code” on your phone.

    carterkit demo qrCode --example 'Wi-Fi sharing QR code'
  3. Swap in any example name from this page, or leave --example off for the first one.

carterkit quickstart · Get CAR-TER

Notes

The QR code is read-only: it has no tap, long-press or detail view, so there is nothing to bind besides the synced value.

Generated from ControlDocs/qr-code.md. Something unclear or missing? Tell me.