Your First QR Code
Get started with react-qr-code in just a few steps.Render the QR code
Add the The
<QRCode /> component with a value prop:value prop is the only required prop and contains the data you want to encode in the QR code.Understanding the Value Prop
Thevalue prop is a string that contains the data to be encoded in the QR code:
- Can be any text, URL, or data string
- Supports up to 2953 characters (per the official QR spec)
- Automatically handles UTF-8 encoding for non-ASCII characters
Important Note: Quiet Zone
If the QR code is likely to appear next to dark objects, you’ll need to wrap it in a light-colored container to preserve the ‘quiet zone’ - the white space around the QR code that helps scanners detect it:Next Steps
Now that you have a basic QR code working, explore more features:Basic Usage
Learn more usage patterns and examples
Styling
Customize colors, size, and make responsive QR codes
API Reference
View all available props and options
React Native
Platform-specific setup and tips