stylish-qr
v10.1.0
Published
[](https://www.npmjs.com/package/stylish-qr)
Readme
StylishQR
StylishQR is a React Native SDK for generating beautiful QR codes with optional logo and download functionality.
It includes a sample JCS file for testing.
Features
- Generate QR codes from strings, URLs, or JSON/JCS content
- Custom colors and background
- Add a logo in the center
- Rounded corners
- Built-in helper to download file or open URL (
downloadFromQR) - Built-in sample JCS content (
sampleJCS)
Installation
npm install stylish-qr
## Installation
Install StylishQR SDK:
```bash
npm install stylish-qr
npm install react-native-fs react-native-svg
For React Native < 0.60, link manually:
react-native link react-native-fs
react-native link react-native-svg
> ⚠️ This ensures native modules are properly linked and work without runtime errors.
---
### ✅ Summary
1. Pure JS dependencies (`react-native-qrcode-styled`) → **dependencies** ✅
2. Native modules (`react-native-fs`, `react-native-svg`) → **peerDependencies** ⚠
3. Include **instructions in README** for installation and linking.
4. This is the **standard approach for all React Native SDKs** using native modules.
---
If you want, I can **rewrite the full StylishQR SDK** with:
- `downloadFromQR` helper
- All dependencies/peerDependencies correctly configured
- Full README with auto-install instructions and RN < 0.60 linking guide
Do you want me to do that?
import React from 'react';
import { SafeAreaView, Button } from 'react-native';
import StylishQR, { downloadFromQR, sampleJCS } from 'stylish-qr';
export default function App() {
return (
<SafeAreaView style={{ flex:1, justifyContent:'center', alignItems:'center' }}>
{/* QR from static JCS */}
<StylishQR value={sampleJCS} size={250} isRounded />
{/* QR from URL */}
<Button
title="Download/Open QR content"
onPress={() => downloadFromQR("https://example.com/sample.pdf")}
/>
</SafeAreaView>
);
}
