Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
Data displayApple

QR code

Render accessible offline QR codes from controlled Unicode values.

Public APILumenQRCodeApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

Native example

Use QR code

Encoding stays offline. Keep the four-module quiet zone and high contrast; hosts own navigation and scanning. Capacity errors retain the input value. See the native QRCode contract for correction levels and matrix APIs.

QR code rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulator
swift
LumenQRCode("Project link", value: "https://lumen.santi020k.com")

Reference

Public API

The primary shared and platform-specific options exposed by LumenQRCode.

APIValues or typeDefaultDescription
label / valueString / stringRequiredNames and controls the locally encoded value.
size / quietZoneNumeric size / integer modules160 / 4Keeps a bounded image size and standards-compatible border.
correction / errorLabel / showValuePlatform correction enum / text / booleanM / English error / trueControls error correction and accessible recovery.

Native behavior

Design and accessibility

When to use it

Encoding stays offline. Keep the four-module quiet zone and high contrast; hosts own navigation and scanning. Capacity errors retain the input value. See the native QRCode contract for correction levels and matrix APIs.

Accessibility

Named image value, visible caption and localized error recovery with scanner-safe contrast.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package