Presets
@masumdev/rn-qr-code includes 16+ pre-configured design presets exported via QR_CODE_CONFIGS:
| Prop | Type | Default | Description |
|---|---|---|---|
BASIC | PresetConfig | — | Standard black & white square QR code with default size. |
TRIANGLE | PresetConfig | — | Golden yellow (#DAA520) QR code with triangle corner eyes and triangle data modules. |
HEART | PresetConfig | — | Pink QR code with heart-shaped corner eyes and heart data modules. |
DOT | PresetConfig | — | Dark slate (#483D8B) QR code with circular dot eyes and dot modules. |
WITH_LOGO | PresetConfig | — | Center embedded logo with custom blue square corner eye radii and dot modules. |
RAIN | PresetConfig | — | Blue (#2074a7) QR code with raindrop-shaped modules and rounded corner eyes. |
LINEAR_GRADIENT | PresetConfig | — | Multi-stop Indigo / Pink / Purple / Blue linear gradient mask with center logo. |
RADIAL_GRADIENT | PresetConfig | — | Yellow to Forest Green radial gradient fill with rounded modules. |
IMAGE_BACKGROUND | PresetConfig | — | Circle eye shapes with error correction Level H and custom image background clip. |
Using Presets Programmatically
import { QRCode, QR_CODE_CONFIGS } from '@masumdev/rn-qr-code';
// Inspect preset keys programmaticallyconsole.log(Object.keys(QR_CODE_CONFIGS));
// Render with preset<QRCode value="Preset Demo" variant="LINEAR_GRADIENT" size={200} />