Skip to content

Presets

@masumdev/rn-qr-code includes 16+ pre-configured design presets exported via QR_CODE_CONFIGS:

PropTypeDefaultDescription
BASICPresetConfig—Standard black & white square QR code with default size.
TRIANGLEPresetConfig—Golden yellow (#DAA520) QR code with triangle corner eyes and triangle data modules.
HEARTPresetConfig—Pink QR code with heart-shaped corner eyes and heart data modules.
DOTPresetConfig—Dark slate (#483D8B) QR code with circular dot eyes and dot modules.
WITH_LOGOPresetConfig—Center embedded logo with custom blue square corner eye radii and dot modules.
RAINPresetConfig—Blue (#2074a7) QR code with raindrop-shaped modules and rounded corner eyes.
LINEAR_GRADIENTPresetConfig—Multi-stop Indigo / Pink / Purple / Blue linear gradient mask with center logo.
RADIAL_GRADIENTPresetConfig—Yellow to Forest Green radial gradient fill with rounded modules.
IMAGE_BACKGROUNDPresetConfig—Circle eye shapes with error correction Level H and custom image background clip.

Using Presets Programmatically

PresetProgrammaticUsage.tsx
import { QRCode, QR_CODE_CONFIGS } from '@masumdev/rn-qr-code';
// Inspect preset keys programmatically
console.log(Object.keys(QR_CODE_CONFIGS));
// Render with preset
<QRCode value="Preset Demo" variant="LINEAR_GRADIENT" size={200} />