MindeesUI
ComponentsSpecialised

QRCode

A themed QR code renderer gated behind the react-native-qrcode-svg peer with a graceful fallback.

QRCode is a thin theme-aware wrapper around react-native-qrcode-svg. When the peer isn't installed, the component renders a MissingPeer notice with the exact install command instead of crashing — so you can ship code that references it without forcing every consumer to install the peer.

Peer dependency

pnpm add react-native-qrcode-svg

When the peer isn't installed, the component renders a MissingPeer fallback with the exact install command — this means you can use it conditionally without crashing.

Import

import { QRCode } from '@mindees/ui';

Usage

<QRCode value="https://mindees.dev" size={240} />

Props

PropTypeDefaultDescription
valuestringThe string encoded into the QR matrix. Required.
sizenumber200Edge length of the rendered QR in dp.
colorstringtokens.colors.text.primaryForeground module colour.
backgroundColorstringtokens.colors.background.canvasBackground fill colour.

Accessibility

The peer renders a static SVG. Wrap the QRCode in a View with accessibilityLabel describing the encoded payload (for example, "QR code to mindees.dev") so screen readers can announce its purpose.

On this page