A lightweight, self-contained QR Code generator built for Etch.

  • SVG-based
  • No external libraries
  • Fully accessible
  • Supports URL, phone, SMS, email, and geo links

Because it outputs SVG, it scales cleanly, prints sharply, and has no
third-party dependencies.

What It Does

This component generates a scannable QR code that users can scan with
their phone camera.

The QR code:

  • Automatically selects the correct QR version (1–10)
  • Uses standard error correction (Level M)
  • Includes proper quiet zone spacing
  • Is accessible (role="img" + <title>)
  • Requires no external scripts

Available Settings

ID

Optional unique identifier for the QR instance.

Used internally for accessibility and debugging. Most users can leave
This blank is used unless multiple QR codes exist on the same page.

Type

Determines how the value is formatted before being encoded.

Options:

  • URL — Opens a website
  • TEL — Initiates a phone call
  • SMS — Opens a text message
  • EMAIL — Opens a mail client
  • GEO — Opens a map location

You do not need to include prefixes like tel: or mailto: — the
component adds those automatically.

Value

The actual content encoded in the QR code.

Examples:

Type Example Value


URL https://flyingw.press
TEL 5551234567
SMS 5551234567
EMAIL hello@example.com
GEO 38.8977,-77.0365

Keep values reasonably short for best scanning reliability.

Size (px)

Controls the width and height of the QR code in pixels.

Examples: – 160 (default) – 200 – 300

Minimum recommended size: 120px

Color

Sets the color of the QR modules (the squares).

Accepts: – Hex values (#000000) – CSS variables (var(--black)) –
Named colors (black)

For best results, use a dark color.

Background Color

Sets the background behind the QR code.

Default: transparent

You may set: – #ffffff – white – var(--neutral-100)

For best scanning performance, use a light background with a dark QR
color.

Show Caption

Toggle to display caption text below the QR code.

Caption

Optional text shown below the QR code.

Example:

Scan to visit FlyingW Press

ARIA Label

Accessibility label read by screen readers.

Example:

QR code linking to FlyingW Press website

If left blank, it automatically generates:

QR code for [your value]

Best Practices

  • Use strong contrast (dark on light)
  • Avoid sizes under 100px
  • Test scans on both iOS and Android
  • Avoid overly long URLs
  • Avoid placing over busy backgrounds

Example Configurations

Website QR Code

  • Type: URL
  • Value: https://fwcbackup.flyingw.dev
  • Size: 200

Phone Call QR Code

  • Type: TEL
  • Value: 5551234567

Map Location QR Code

  • Type: GEO
  • Value: 38.8977,-77.0365

Troubleshooting

If the QR code does not scan:

  • Verify the value is valid
  • Increase the size
  • Improve color contrast
  • Try a white background instead of transparent

This component is fully self-contained, requires no external libraries,
and generates production-ready SVG QR codes directly within Etch.